All control constructs can be both named and nested.
outa: IF (a .NE. 0) THEN x = b/a inna1: IF (c .NE. 0) THEN y = d/c ELSE inna1 y = -99 ENDIF inna1 ELSEIF (a .GT. 0) THEN outa ... ELSE outa ... 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