Integer Variables and Arrays
Integer variables are internally represented as 32-bit values. Integer variable names are similar to regular numeric variables except they must have a percent sign "%" at the end:
1000 LET COUNT%=34
1020 PRINT X%+Y%
Likewise, integer arrays may be used:
1000 DIM A%[100],B%[55]
1020 PRINT A%[4]
The names of integer variables are not in conflict with regular numeric variables. Any attempt to assign a non-integer value to an integer variable will result in an error.
1000 LET A%=5 |
(OK) |
1010 LET A%=1.5 |
(ERROR) |
1020 LET B=3,A%=B |
(OK since B contains an integer) |
Generally, integer variables may be mixed in calculations with regular numeric variables.