Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
EXTERNAL
◄Up► ◄Contents► ◄Index► ◄Back►
─────EXTERNAL ──────────────────────────────────────────────────────────────
Action
Identifies a user-defined name as an external subroutine or
function.
Syntax
EXTERNAL name [ [attrs] ] [,name[ [attrs] ] ]...
Parameter Description
name The name of an external subroutine or function.
[attrs] A list of attributes, separated by commas. Valid
attributes are: ALIAS, C, FAR, LOADDS, NEAR,
PASCAL, VARYING.
Remarks
EXTERNAL can replace an intrinsic function with a user-defined
function of the same name.
If an intrinsic-function name appears in an EXTERNAL statement,
that name becomes the name of an external procedure. The
corresponding intrinsic function can no longer be called from
that program unit. A name can only appear once in an EXTERNAL
statement in any given program unit.
Examples
EXTERNAL MyFunc, MySub
C MyFunc and MySub are arguments to Calc
CALL Calc (MyFunc, MySub)
C Example of a user-defined function replacing an intrinsic
EXTERNAL SIN
x = SIN (a, 4.2, 37)
-♦-