GLBasic User Manual

Main sections

ENDIF

IF a#$ = < <= > >= <> b#$
...
| ELSEIF ...
| ...
| ELSE
| ...
ENDIF



An ENDIF statement terminates an IF statement block.

Sample:
 
a=5; b=3

IF a < b
PRINT "a < b", 100, 100
ELSE
PRINT "a < b is FALSE", 100, 100
ENDIF

IF a<>b THEN PRINT "a is not b", 100, 150

SHOWSCREEN
MOUSEWAIT


Output:
a < b is FALSE
a is not b

See also...