Next: Arithmetic, Previous: Comments, Up: Words
A Boolean flag is cell-sized. A cell with all bits clear represents the
flag false and a flag with all bits set represents the flag
true. Words that check a flag (for example, IF) will treat
a cell that has any bit set as true.
true – f core-ext “true”
Constant – f is a cell with all bits set.
false – f core-ext “false”
Constant – f is a cell with all bits clear.
on a-addr – gforth “on”
Set the (value of the) variable at a-addr to true.
off a-addr – gforth “off”
Set the (value of the) variable at a-addr to false.