The EXTERNAL statement specifies procedures or dummy procedures as external, and allows their symbolic names to be used as actual arguments.
Parameter |
Description |
proc |
Name of external procedure, dummy procedure, or block data routine. |
If an external procedure or a dummy procedure is an actual argument, it must be in an EXTERNAL statement in the same program unit.
If an intrinsic function name appears in an EXTERNAL statement, that name refers to some external subroutine or function. The corresponding intrinsic function is not available in the program unit.
A subroutine or function name can appear in only one of the EXTERNAL statements of a program unit.
A statement function name must not appear in an EXTERNAL statement.
Example 1: Use your own version of TAN:
EXTERNAL TAN T = TAN( 45.0 ) ... END FUNCTION TAN( X ) ... RETURN END
Example 2: Pass a user-defined function name as an argument:
REAL AREA, LOW, HIGH EXTERNAL FCN ... CALL RUNGE ( FCN, LOW, HIGH, AREA ) ... END FUNCTION FCN( X ) ... RETURN END SUBROUTINE RUNGE ( F, X0, X1, A ) ... RETURN END