All control constructs can be both named and nested.
outa: IF (a .NE. 0) THEN PRINT*, "a /= 0" IF (c .NE. 0) THEN PRINT*, "a /= 0 AND c /= 0" ELSE PRINT*, "a /= 0 BUT c == 0" ENDIF ELSEIF (a .GT. 0) THEN outa PRINT*, "a > 0" ELSE outa PRINT*, "a must be < 0" ENDIF outa
The names may only be used once per program unit and are only intended to make the code clearer.
For more information, click here