The ELSE statement indicates the beginning of an ELSE block.
IF (e) THEN
...
ELSE
...
END IF
where e is a logical expression.
Execution of an ELSE statement has no effect on the program.
An ELSE block consists of all the executable statements following the ELSE statements, up to but not including the next END IF statement at the same IF level as the ELSE statement. See "IF (Block)" for more information.
An ELSE block can be empty.
You cannot jump into an ELSE block from outside the ELSE block.
The statement label, if any, of an ELSE statement cannot be referenced by any statement.
A matching END IF statement of the same IF level as the ELSE must appear before any ELSE IF or ELSE statement at the same IF level.
CHARACTER S ... IF ( S .GE. '0' .AND. S .LE. '9' ) THEN CALL PUSH ELSE CALL TOLOWER END IF ...
Example 2: An invalid ELSE IF where an END IF is expected:
IF ( K .GT. 5 ) THEN N = 1 ELSE N = 0 ELSE IF ( K .EQ. 5 ) THEN Incorrect ...