Arguments are separated by commas.
The FORTRAN 77 Standard requires that actual arguments in a CALL statement must agree in order, number, and type with the corresponding formal arguments of the referenced subroutine. The compiler checks this only when the -XlistE option is on.
Recursion is allowed. A subprogram can call itself directly, or indirectly by calling another subprogram that in turns calls this subroutine. Such recursion is nonstandard. @
An actual argument, ar, must be one of the following:
An intrinsic function permitted to be passed as an argument; for a list of the intrinsics that cannot be actual arguments, see Table 4-2.
An external function name
A subroutine name
An alternate return specifier, * or &,followed by a statement number. The & is nonstandard. @
The simplest expressions, and most frequently used, include such constructs as:
Formal argument, if the CALL statement is inside a subroutine
If a subroutine has no arguments, then a CALL statement that references that subroutine must not have any actual arguments. A pair of empty matching parentheses can follow the subroutine name.
Execution of the CALL statement proceeds as follows:
All expressions (arguments) are evaluated.
All actual arguments are associated with the corresponding formal arguments, and the body of the subroutine is executed.
Normally, the control is transferred back to the statement following the CALL statement upon executing a RETURN statement or an END statement in the subroutine. If an alternate return in the form of RETURN n is executed, then control is transferred to the statement specified by the n alternate return specifier in the CALL statement.
A CALL to a subprogram defined as a FUNCTION rather than as a SUBROUTINE will cause unexpected results and is not recommended. The compiler does not automatically detect such inappropriate CALLs and no warning is issued unless the -Xlist option is specified.