END FUNCTION statement

Standard: F77 F90 F95 F2003 F2008 F2018 Example program


END [ FUNCTION [ function-name ] ]

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


The END FUNCTION statement marks the end of a function subprogram. The function subprogram may be an external function, a module function or an internal function.

Executing an END FUNCTION statement has the same effect as a RETURN statement.


CONTAINS statement, END statement, FUNCTION statement, RETURN statement