pTAL Reference Manual (H06.08+)
Compiler Directives
HP pTAL Reference Manual—523746-006
17-9
Saving Global Data Declarations
Saving Global Data Declarations
When you compile with SAVEGLOBALS, the compiler saves the global data
declarations—global data identifiers and their attributes (such as data type and kind of
variable initialization)—in a file whose file code is 701.
If you make no changes in the global data declarations, you can use the saved
declarations in subsequent USEGLOBALS compilations, reducing their compilation
time.
SAVEGLOBALS does not save FORWARD procedure declarations or EXTERNAL
procedure declarations. You must recompile these declarations in the USEGLOBALS
compilation.
When you use the following directives in the SAVEGLOBALS compilation, they affect
subsequent USEGLOBALS compilations as follows:
You must use the same version of the compiler for the SAVEGLOBALS compilation
and the USEGLOBALS compilation; otherwise, an error occurs in the USEGLOBALS
compilation.
Whenever you switch to a new version of the compiler, you must recompile the source
code using SAVEGLOBALS to create a new global declarations file.
Retrieving Global Data Declarations
After a SAVEGLOBALS compilation completes successfully, you can specify the
following directives in a USEGLOBALS compilation to retrieve the global data
declarations and initializations:
Directive in
SAVEGLOBALS
Compilation Effect in Subsequent USEGLOBALS Compilations
SYNTAX
Negates the need for using the USEGLOBALS compilation because no
object file was produced by the SAVEGLOBALS compilation
PRINTSYM
Continues to print symbols in the listing
SYMBOLS
Continues to make symbols available for all data blocks that had
symbols during the SAVEGLOBALS compilation
Directive in
USEGLOBALS
Compilation Effect in Same USEGLOBALS Compilation
USEGLOBALS
•
Retrieves global data declarations
•
Suppresses compilation of text lines and SOURCE directives
(but not other directives) until BEGINCOMPILATION appears
BEGINCOMPILATION
Begins compilation of text lines and SOURCE directives










