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

πŸ“š A BAM Use-Case: Giving a New Lease on Life to Old BASIC Programs

One BAM's top goals is to make it fairly easy to port old BASIC programs so that they can be shared via the web for running in any web b...