Next: , Previous: Comments, Up: Words


5.4 Boolean Flags

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       unknown         unknown       “True”

False       unknown         unknown       “False”

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.