IF Bool-exp THEN statement(s) {ELSE statement(s)}

The IF..THEN statement causes conditional execution of statements. It is the fundamental form of program control. If Bool-exp evaluates to be TRUE, the statements following THEN will be executed, and execution will then proceed to the next line of the program (i.e., if there is an ELSE in the line, it will be ignored). The optional ELSE statement has the following effect. If Bool-exp evaluates to FALSE, the statements following the ELSE will be executed.

Program Example.

00100 A = 10
00110 B = 9
00120 IF A = 10 THEN PRINT "A = <> 10"
00130 IF (B <> 10) AND (A = 10) THEN PRINT "True"
00140 END

Try it