IF-THEN-END IF

The IF-THEN-END IF form is a simplification of the general IF-THEN-ELSE-END IF form with the ELSE part omitted:

IF (logical-expression) THEN
   statements
END IF
where statements is a sequence of executable statements, and logical-expression is a logical expression. The execution of this IF-THEN-ELSE-END IF statement goes as follows:

Examples

A Useful Tip

The box trick can also be used with this IF-THEN-END IF form. Since there is no ELSE, you can leave the lower part empty like the following:

logical-expression what you want to do when the logical expression is .TRUE.
nothing is here!!!