[ColorForth] Question regarding if
- Subject: [ColorForth] Question regarding if
- From: Alex Thiel <alex.lists@xxxxxxxxxx>
- Date: Fri, 12 Jul 2002 15:08:41 +0200
Hello,
I want to write a word that test the TOS for a non-zero value. I have tried
: tst if 1 ; then 2 ;
: foo 0 tst 1 tst ;
Execution of foo leaves 0 2 1 2 on the stack, i.e. pushing a constant does not
seem to affect the flags. Is this expected behavior?
As a workaround I do
: tst 0 or if 1 ; then 2 ;
Does anyone have a better idea?
Cheers,
Alex
------------------------
To Unsubscribe from this list, send mail to Mdaemon@xxxxxxxxxxxxxxxxxx with:
unsubscribe ColorForth
as the first and only line within the message body
Problems - List-Admin@xxxxxxxxxxxxxxxxxx
Main ColorForth site - http://www.colorforth.com
Wiki page http://kristopherjohnson.net/wiki/ColorForth
ColorForth index http://www.users.qwest.net/~loveall/c4index.htm