The ELSE IF statement is the first statement of an optional ELSE IF block within an IF construct.
>>-ELSE IF--(--scalar_logical_expr--)--THEN--+-------------------+->< '-IF_construct_name-'
scalar_logical_expr is evaluated if no previous logical expressions in the IF construct are evaluated as true. If scalar_logical_expr is true, the statement block that follows is executed and the IF construct is complete.
If you specify an IF_construct_name, it must be the same name that you specified in the block IF statement.
IF (I.EQ.1) THEN J=J-1 ELSE IF (I.EQ.2) THEN J=J-2 ELSE IF (I.EQ.3) THEN J=J-3 ELSE J=J-4 END IF