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.
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.