The EXTERNAL statement declares constants, variables, functions, and subroutines external to your program. You can describe parameters for external functions and subroutines. Examples: EXTERNAL INTEGER CONSTANT SS$_NORMAL EXTERNAL INTEGER Event_flag EXTERNAL INTEGER FUNCTION Rect_area (REAL BY REF, REAL BY REF) EXTERNAL SUB File_open (LONG BY VALUE, STRING)
1 – Syntax
External Constants: EXTERNAL data-type CONSTANT const-name,... External Variables: EXTERNAL data-type unsubs-var-name,... External Functions: EXTERNAL data-type FUNCTION {func-name [pass-mech] [([external- param],...)]} External Subroutines: EXTERNAL SUB {sub-name [pass-mech] [([external-param],...)]},... external-param: [OPTIONAL] [ data-type ] [ DIM ([,]...) ] [ pass-mech] pass-mech: { BY DESC } { BY REF } { BY VALUE }