HP 3000 Manuals

EXTERNAL [ HP Pascal/iX Reference Manual ] MPE/iX 5.0 Documentation


HP Pascal/iX Reference Manual

EXTERNAL 

EXTERNAL is an HP Pascal Option.

The EXTERNAL compiler option causes the compiler to generate code for
routines, but not for statements in the outer block.  It also generates
symbolic information about global variables, allowing them to be matched
(by external name) to their counterparts in the compilation unit compiled
with the GLOBAL compiler option.  (The EXTERNAL compiler option is used
in compilation units compiled with the SUBPROGRAM compiler option.)

Syntax 

$EXTERNAL ['{PASCAL}']$
          [ {NONE  } ]
Parameters 

PASCAL        Causes the compiler to include type-checking information in
              the object file so that the global variables can be
              compared to those in a compilation unit that was compiled
              with $GLOBAL 'PASCAL'$.

NONE          Prevents the compiler from including type-checking
              information for global variables in the object file.

No parameter  Same as PASCAL.

Default       PASCAL.

Location      At front.

The EXTERNAL option, in conjunction with the GLOBAL option, enables you
to compile one program as two or more compilation units.  Specify the
GLOBAL option in the compilation unit that declares the global variables
and contains the main program.  Specify the EXTERNAL option in each of
the other compilation units that declare routines, and in each of the
global variables that those routines use.  A compilation unit cannot
contain both the EXTERNAL option and the GLOBAL option.

A compilation unit with the EXTERNAL option does not need to declare all
of the global variables.  It only needs to declare the ones that it uses,
and they can be in any order.  See the example for the GLOBAL compiler
option.


NOTE Do not confuse the EXTERNAL compiler option with the EXTERNAL directive. Refer to the HP Pascal/iX Programmer's Guide or the HP Pascal/HP-UX Programmer's Guide, depending on your implementation, for information on the EXTERNAL directive.


MPE/iX 5.0 Documentation