FORTRAN Reference Manual
Statements
FORTRAN Reference Manual—528615-001
7-38
EXTERNAL Statement
EXTERNAL Statement
The EXTERNAL statement declares the name of an external procedure and enables
you to use the name as an actual argument.
proc-name
is the name of an external procedure, dummy procedure, or block data
subprogram.
Considerations
If you use an external procedure name or dummy procedure name as an actual
argument in a program unit, you must declare it in an EXTERNAL statement in the
program unit. When you use proc-name in the argument list of a CALL statement or
function reference, FORTRAN treats it as a subprogram name rather than a variable or
array name.
If an intrinsic function name appears in an EXTERNAL statement in a program unit,
that name becomes the name of an external procedure and you cannot reference the
intrinsic function of the same name in that program unit.
Example
In the following example, the function name MULTIPLY must appear in an EXTERNAL
statement because it is used as an argument for the external function
CALC:
PROGRAM main
EXTERNAL multiply
4 p = CALC(a, b, multiply)
END
FUNCTION CALC(r,s,t)
1 CALC = s**2 + t(r)
END
EXTERNAL proc-name [, proc-name ]...










