FALSE (FA.)
A function returning the value zero.
10 flag=FALSE
20 …
150 IF flag ...BBC BASIC(Z80) does not have true Boolean variables. Instead, numeric variables are used and their value is interpreted in a ‘logical’ manner.
A value of zero is interpreted as FALSE and NOT FALSE (in other words, NOT 0) is interpreted as TRUE. In practice, any value other than zero is considered TRUE.
You can use FALSE in a REPEAT…UNTIL loop to make the loop repeat forever. Consider the following example.
10 terminator=10
20 REPEAT: PRINT "An endless loop": UNTIL terminator=0Since ‘terminator’ will never be zero, the result of the test ‘terminator=0’ will always be FALSE. Thus, the following example has the same effect as the previous one.
10 REPEAT: PRINT "An endless loop": UNTIL FALSESimilarly, since FALSE=0, the following example will also have the same effect, but its meaning is less clear.
10 REPEAT: PRINT "An endless loop": UNTIL 0See the keyword AND for logical tests and their results.
Syntax
<n-var>=FALSEAssociated Keywords
TRUE, EOR, OR, AND, NOT