FORTRAN 77 Language Reference

IF Level

The IF level of a statement S is the value n1-n2, where n1 is the number of block IF statements from the beginning of the program unit up to the end, including S; n2 is the number of END IF statements in the program unit up to, but not including, S.

Example: In the following program, the IF-level of statement 9 is 2-1, or, 1


       IF ( X .LT. 0.0 ) THEN 
              MIN = NODE 
       END IF 
       ... 
9      IF ( Y .LT. 0.0 ) THEN 
              MIN = NODE - 1 
       END IF 

:

The IF-level of every statement must be zero or positive. The IF-level of each block IF, ELSE IF, ELSE, and END IF statement must be positive. The IF-level of the END statement of each program unit must be zero.