Standard: F77 F90 F95 F2003 F2008 F2018 Example program


END [ SUBROUTINE [ subroutine-name ] ]

Prior to Fortran 2008, the SUBROUTINE keyword is required for an internal or module subroutine. The blank between END and SUBROUTINE is optional.


The END SUBROUTINE statement marks the end of a subroutine subprogram, which may be an external subroutine, an internal subroutine or a module subroutine.

Executing an END SUBROUTINE statement returns from the subroutine, exactly as if a RETURN statement had been executed.


CALL statement, CONTAINS statement, END statement, RETURN statement, SUBROUTINE statement