HP Fortran Programmer's Reference (September 2007)

Program units and procedures
External procedures
Chapter 7162
specification-part
is zero or more of the statements listed in Table 7-1 as well as the
AUTOMATIC statement.
execution-part
is zero or more of the statements listed in Table 7-2 as well as the following
statements:
ENTRY statement
RETURN statement
internal-procedure-part
takes the form:
CONTAINS
[
internal-procedure
]...
internal-procedure
is the definition of an internal procedure; see “Internal procedures” on
page 167.
end-external-procedure-statement
takes one of the following forms, depending on whether the procedure is a
subroutine or function:
END [SUBROUTINE [
subroutine-name
]]
END [FUNCTION [
function-name
]]
Procedure reference
A procedure reference—also known as a
procedure call
—occurs when a procedure name is
specified in an executable statement, which causes the named procedure to execute. The
following sections describe references to subroutines and functions, and recursive
references—when a procedure directly or indirectly calls itself.
Referencing a subroutine
A reference to an external subroutine occurs in a CALL statement, which specifies either the
subroutine name or one of its entry point names. The syntax of the CALL statement is:
CALL
subroutine-name
[([
actual-argument-list
])]
actual-argument-list
is a comma-separated list of the actual arguments that take the form: