The simple IF statement makes a yes/no decision
Any time execution encounters the simple IF statement, a choice is made whether or not to execute the enclosed set of statements:
IF control_expression
Statement 1
Statement 2
ENDIF
- If control_expression tests true, execute the set of statements between the IF and the ENDIF.
- If control_expression tests false, skip all the statements and continue execution with whatever comes after the ENDIF.
- IF is not a loop. When the simple IF statement is encountered, the set of enclosed statements is only executed once, or not at all.