IF statement
Standard: F77 F90 F95 F2003
  Example Program
<Syntax>
IF ( expression ) executable

The expression must be a scalar Logical. The executable cannot itself be an IF statement, nor any statement that begins or ends a construct.

There is also an arithmetic IF statement, but it is error-prone and obsolescent. Its syntax is as follows.

IF ( expression ) label , label , label

The expression must be a scalar Real or Integer.
<Semantics>
The IF statement controls a single executable statement, which is executed if and only the expression is true.

The arithmetic IF statement transfers control to the first label if the expression is negative, to the second label if it is zero, and the third label if it is positive. For type Real, both negative and positive zero are treated as zero.
<Related>
ELSE statement, ELSE IF statement, END IF statement, IF construct, IF THEN statement