Wednesday, June 7, 2023

☢ Single-line IF THEN: a statement must immediately follow the THEN keyword !

 Here's an interesting syntax issue which does not result in a very useful error message:


Currently (and for the foreseeable future), BASIC Anywhere Machine does not know how to provide an informative error message for this problem, a syntax problem that has the interpreter completely confused.

When creating a single-line IF-THEN statement, the BASIC Anywhere Machine program will fail if a THEN statement is immediately followed by a colon without any statement between "THEN" and the colon.

So should you run into an error message that does not make any sense at all, take a look at your code in the near vicinity to rule out this kind of syntax problem in any single-line IF-THEN statements.


No comments:

Post a Comment

πŸ–₯ Fan Dance

This is a port and mod of a SpecBAS program by ZXDunny. Run the program View the source code And, a "less is more?" version: Run t...