int e l 8.5 ANOMALIES Most dictionaries define an anomaly as a deviation from the normal or common order or as an irregularity anomalies to an extreme become "BUGS" or something that is wrong with the program. Like all programs, MCS BASIC-52 contains some anomalies, hopefully, no bugs. The purpose of mentioning the known anomalies here is that it may save the programmer some time, should strange things happen during program execution. The known anomalies deal mainly with the way MCS BASIC-52 compacts or tokenizes the BASIC program. The known anomalies and cautions are as follows:
1) When using the variable H after a line number, make sure you put a space between the line number and the H, or else BASIC will assume that the line number is a HEX number. EXAMPLES: >20H=10 (WRONG) >20 H=10 (RIGHT) >LIST >LIST 32 =10 20 H=10 2) When using the variable I before an ELSE statement, make sure you put a space between the I and the ELSE statement, or else BASIC will assume that the IE portion of IELSE is the special function operator IE. EXAMPLES: >20 IF I>10 THEN PRINT IELSE 100 >LIST 20 IF I>10 THEN PRINT IELSE 100 (WRONG) >20 IF I>10 THEN PRINT I ELSE 100 >LIST 20 IF 1>10 THEN PRINT I ELSE 100 (RIGHT) 3) A Space character may not be placed inside the ASC() operator.
In other words, a statement like PRINT ASC( ) will yield a BAD SYNTAX ERROR. Spaces may be placed in strings however, so a statement like LET $(1) = "HELLO, HOW ARE YOU" will work properly. The reason ASC( ) yields an error is because MCS BASIC-52 eliminates all spaces when a line is processed. so ASC( ) will be stored as ASC() and MCS BASIC-52 interprets this as an error. - 103 -