retro.forth: clarify that non-zero is now true
FossilOrigin-Name: 38c07e9ce04eaf86d51a91a6d80acd991bfcf892f97934f4b77375743203a56f
This commit is contained in:
parent
6f6584401a
commit
e3287b1ffa
1 changed files with 2 additions and 3 deletions
|
@ -462,9 +462,8 @@ to:
|
||||||
Taking a break from combinators for a bit, I turn to some words
|
Taking a break from combinators for a bit, I turn to some words
|
||||||
for comparing things. First, constants for TRUE and FALSE.
|
for comparing things. First, constants for TRUE and FALSE.
|
||||||
|
|
||||||
Due to the way the conditional execution works, only these
|
I define `TRUE` as -1 and `FALSE` as zero, but any non-zero
|
||||||
values can be used. This is different than in a traditional
|
value will be treated as TRUE by the conditional words.
|
||||||
Forth, where non-zero values are true.
|
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
:TRUE (-n) #-1 ;
|
:TRUE (-n) #-1 ;
|
||||||
|
|
Loading…
Reference in a new issue