This article is about the Simon's BASIC keyword %.
Syntax: a = %11110000 (for example)
The % prefix allows the programmer to express a numeric constant in the binary numeral system. When the interpreter encounters the % prefix, it will recognize the number that follows as a binary number. The only accepted digits are 0 or 1, and the value must be within 0 and 255, inclusive. The number of digits must be 8. If the interpreter can't parse the given number, the
?NOT BINARY CHAR
error is displayed.
PRINT "THE NUMBER %10010101 IS DECIMAL" %10010101
THE NUMBER %10010101 IS DECIMAL 149