EXTERNAL
PLBCMP Only
The EXTERNAL instruction (which may be abbreviated as EXTERN) declares a subroutine name that is defined in a separately compiled module. The instruction uses the following format:
|
|
|
|
|
Where:
label
Required. A Data Definition Label.
subroutine
Optional. A Character String Variable or Literal declaring the external routine name.
Flags Affected: NONE
Note the following:
The subroutine defined with the EXTERNAL instruction must be called using the parameterized CALL or CALLS instructions. The actual subroutine must be defined in the separately compiled module using the ROUTINE or PROCEDURE instruction.
If {subroutine} is not specified, the name of the external subroutine is the same as the label for the EXTERNAL instruction.
If {subroutine} is a literal, it specifies the name of the external subroutine and entry point that is associated with the label for the EXTERNAL statement.
If {subroutine} is a variable, it specifies the name of the external subroutine and entry point that is associated with the label for the EXTERNAL statement. This form allows the subroutine and module name that is dynamically assigned at run-time.
The information contained in {subroutine} may include three (3) items. The format is:
Multiple instances of the same routine may be loaded at the same time by using the {alias} feature.
The module name specified for the EXTERNAL statement is case sensitive. The external subroutine name is not case sensitive.
See Also: Example Code, CALL, LROUTINE, ROUTINE, XCALL, Compiler Directives
![]() |