FORTRAN 77 Language Reference

END IF

The END IF statement ends the block IF that the IF began and requires the following syntax:

END IF

Description

For each block IF statement there must be a corresponding END IF statement in the same program unit. An END IF statement matches if it is at the same IF level as the block IF statement.

Examples

Example 1: IF/END IF


       IF ( N .GT. 0 )THEN
              N = N+1
       END IF

:

Example 2: IF/ELSE/END IF:


       IF ( N .EQ. 0 ) THEN
              N = N+1
       ELSE
              N = N-1
       END IF