
208
• A block-structured IF statement block has the following advantages over a single-line
IF statement (which is not supported in BHT-BASIC):
- More complex conditions can be tested since an IF statement block can contain 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 correction and
debugging easy.
• You can use ENDIF instead of END IF.
Syntax errors:
Syntax errors:Syntax errors:
Syntax errors:
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.
Example:
Example:Example:
Example:
k$=INKEY$
IF k$<>""THEN
PRINT k$;
END IF
Referen
ReferenReferen
Reference:
ce:ce:
ce:
Statements:
DEF FN ..END DEF, FOR ..NEXT, ONGOSUB, ON ..GOTO,
SELECT ..CASE ..END SELECT, and WHILE ..WEND
Comentarios a estos manuales