TAL Programmer's Guide
Compiling With Saved Global Data
Compiling Programs
096254 Tandem Computers Incorporated 14–23
Compiling With
Saved Global Data
During program development or maintenance, you often need to change procedural
code or data without changing the global declarations. You can save the global data in
a file during a compilation session and then use the saved global data during a
subsequent compilation. You can shorten the compile time by not compiling global
declarations each time.
Saving Global Data To save the compiled global data declarations, use the SAVEGLOBALS directive.
SAVEGLOBALS causes the data declarations to be stored as follows:
Identifiers and data characteristics (including data type and kind of variable) in a
global declarations file
Initialization values (including addresses and constant lists) in the object file
Note Whenever you switch to a different version of the compiler, you must create a new global declarations file
by using SAVEGLOBALS. Otherwise, an error message occurs when you compile to retrieve the saved
globals. Each version of the compiler expects declarations in a different format. (C30, D10, and D20, for
example, are different versions of the compiler.)
Retrieving Global Data After a SAVEGLOBALS compilation completes successfully, you can retrieve the
global data declarations and initializations in a subsequent USEGLOBALS compilation
by specifying the following directives:
Directive for Retrieving
Global Data Effect
USEGLOBALS Retrieves global data declarations; suppresses compilation of text lines
and SOURCE directives (but not other directives) until
BEGINCOMPILATION appears
SEARCH Retrieves global initialization values and template structures
BEGINCOMPILATION Begins compilation of text lines and SOURCE directives
Specify BEGINCOMPILATION between the last global data declaration or SEARCH
directive and the first procedure declaration, including EXTERNAL or FORWARD
declarations. (You must recompile EXTERNAL or FORWARD procedure declarations
in the USEGLOBALS compilation. SAVEGLOBALS does not save such declarations.)
Note
If you specify SAVEGLOBALS and USEGLOBALS in the same compilation, the compiler issues an error
message and uses only the first of the two directives.
If you use CROSSREF with USEGLOBALS, the compiler does not pass Inspect and CROSSREF
symbols information for global identifiers to SYMSERV.