Top: f77 Up: 13 - Statements
Previous: 13,10 - BLOCK_DATA Next: 13,12 - CLOSE
Section 13,11: CALL
Transfers control and passes arguments to a subprogram. Statement
format:
CALL sub[([a][,[a]]...)]
sub Is the name of a subroutine, or other external
procedure, or a dummy argument associated with
a subroutine subprogram or other external procedure.
a Is a value to be passed to the subroutine.
If you specify an argument list, the CALL statement associates the
values in the list with the dummy arguments in the subroutine. It
then transfers control to the first executable statement following
the SUBROUTINE or ENTRY statement referenced by the CALL statement.
The arguments in the CALL statement must agree in number, order,
and data type with the dummy arguments in the subroutine. They can
be variables, arrays, array elements, records, record elements,
record arrays, record array elements, substring references,
constants, expressions, Hollerith constants, alternate return
specifiers, or subprogram names. An unsubscripted array name or
record array name in the argument list refers to the entire array.
An alternate return specifier is an asterisk (or ampersand)
followed by the label of a statement in the program unit containing
the CALL statement.
DEC Fortran allows direct or indirect recursive calls to
subroutines, if you specify the -assume recursive compiler option.
Top: f77 Up: 13 - Statements
Previous: 13,10 - BLOCK_DATA Next: 13,12 - CLOSE