GLBasic User Manual

Main sections

ELSE

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



or:

An ELSE statement indicates the beginning of a code block inside an IF statement. This code block will be executed if the condition checked for by the IF statement evaluates to a false state.

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...