IF a#$ = < <= > >= <> b#$
| ELSEIF ...
IF a#$ = < <= > >= <> b#$ THEN ...
An IF statement allows for a block of code to be executed if a certain condition (a#...b#) is found to be true - i.e. it executes the code between the IF and ENDIF statements if the particular comparison of variables a#$ and b#$ is TRUE. If the comparision evaluates to FALSE, the code between ELSE and ENDIF is executed (provided an ELSE statement was supplied).
Using an ELSEIF command allows you to add another test to perform if the previous test condition evaluated to false:
PRINT "a>5", 0,0
PRINT "a<=5, but b>5", 0,0
PRINT "Neither a nor b > 5", 0,0
You can use the command THEN if you only want one command to be executed if the comparison is TRUE.
IF a < b
PRINT "a < b", 100, 100
PRINT "a < b is FALSE", 100, 100
IF a<>b THEN PRINT "a is not b", 100, 150
a < b is FALSE
a is not b