Note that T = TRUE and F = FALSE.
Example:
10
20
30
40
50
60
RUN
? 10
?? 5
?? 7
A=B=C IS FALSE
Moreover AND, OR, and NOT can be used to manipulate numerical values. These operations
are based on binary numbers with 1 and 0 representing TRUE and FALSE respectively.
For example:
NOT 1=-2 [1=binary 00000001 and -2=binary 11111110, so it just changes the 1 to 0 and
0 to 1. In other words, TRUE(1) changed to FALSE(0) and FALSE(0) changed to TRUE(1).]
OR 13=15 [6=binary 00000110 and 13=binary 00001101, so, with reference to the OR truth
table, 6 OR 13 =15=binary 00001111]
AND 13=4 [6=binary 00000110 and 13=binary 00001101, so with reference to the AND truth
table, 6 AND 13=4 binary 00000100]
INPUT
Line #
INPUT "(optional character string)"; variable 1, variable 2,....
INPUT allows the user to type in the value of a variable at the time the program is RUN.
If an optional character string is used, this message will be printed before the question
is asked. The type of data to be INPUT varies according to the type of the variable.
INPUT A,B,C
IF A=B AND B=C THEN PRINT "A=B=C"
IF (NOT A=B) OR (NOT B=C) THEN 50
END
PRINT "A=B=C IS FALSE"
END
(pick a number)
(pick a number)
(pick a number)
61