The logical IF statement executes one single statement, or does not execute it, depending on the value of a logical expression.
Parameter |
Description |
e |
Logical expression |
st |
Executable statement |
The logical IF statement evaluates a logical expression and executes the specified statement if the value of the logical expression is true. The specified statement is not executed if the value of the logical expression is false, and execution continues as though a CONTINUE statement had been executed.
st can be any executable statement, except a DO block, IF, ELSE IF, ELSE, END IF, END, or another logical IF statement.
IF ( VALUE .LE. ATAD ) CALL PUNT ! Note that there is no THEN. IF ( TALLY .GE. 1000 ) RETURN