pTAL Conversion Guide

Compiler Operation
pTAL Conversion Guide527302-002
19-28
Separate Compilation
Separate Compilation
In both TAL and pTAL, separate compilation allows you to compile and save the global
declarations for a program and then reference the already-compiled global data in
subsequent compilations of the program.
Differences:
A global declarations file created through one version of the native compiler cannot be
used with any other version of the native compiler.
Default: pTAL compiler: TNS_R_ARCH
EpTAL compiler: _TNS_E_TARGET
Placement: Anywhere
Scope: Applies to the compilation unit
Dependencies: None
TAL pTAL
Initialization values of
saved global data:
Are stored in the object
file
Must be retrieved by a
SEARCH directive after
a USEGLOBALS
directive retrieves the
global declarations
Are stored in the same
file as the saved global
declarations
Are retrieved by the
same USEGLOBALS
directive that retrieves
the global declarations
File code of a global
declarations file:
105 701
BEGINCOMPILATION
directive:
Optional. If absent, the
SAVEGLOBALS process
ends when the compiler
encounters the first
procedure declaration
(including a FORWARD or
EXTERNAL procedure
declaration).
Must appear exactly once,
between the last global
declaration and the first
procedure body.
LITERALs, DEFINEs,
structure templates, and
FORWARD and EXTERNAL
procedure declarations can
appear before or after the
BEGINCOMPILATION
directive. Declarations that
occur before the
BEGINCOMPILATION
directive are saved in the
SAVEGLOBALS file when it is
created and read from the
USEGLOBALS file on
subsequent compilations.