Specifications
227
• A block-structured
IF statement block has the following advantages over a sin-
gle-line
IF statement (which is not supported in BHT-BASIC):
- More complex conditions can be tested since an
IF statement block can con-
tain more than one line for describing conditions.
- You can describe as many statements or statement blocks as you want.
- Since it is not necessary to put more than one statement in a line, you can
describe easy-to-read programs according to the logical structure, making cor-
rection and debugging easy.
• You can use
ENDIF instead of END IF.
Syntax errors:
Example:
k$=INKEY$
IF k$<>"" THEN
PRINT k$;
END IF
Reference:
Error code and message Meaning
error 26:
Too deep nesting.
error 50: Incorrect use
of IF...THEN
...ELSE...END
IF
THEN
is missing.
error 51: Incomplete
control
structure
END IF is missing.
Statements:
DEF FN...END DEF, FOR...NEXT, ON…GOSUB, ON...GOTO,
SELECT...CASE...END
SELECT, and WHILE...WEND