TAL Reference Manual
NAMEs and BLOCKs
TAL Reference Manual—526371-001
11-2
Usage Considerations
Usage Considerations
A compilation unit that contains a NAME declaration as its first declaration is called a
named compilation unit. If the compilation unit contains no BLOCK declarations, the
NAME declaration is optional.
If a compilation unit contains a BLOCK declaration, the NAME declaration must be the
first declaration in the compilation unit. NAME is a reserved keyword only within the
first declaration; you can use the term NAME elsewhere as an identifier.
The identifier declared in a NAME declaration is accessible as follows:
•
If the current compilation unit has a private data block, the NAME identifier has
global scope among all compilation units in the target file. No other compilation unit
in the target file can use the same identifier at the global level.
•
If the current compilation unit has no private data block, the identifier has global
scope within the current compilation unit only.
Example of NAME Declaration
This example assigns the identifier CALC_MOD to a compilation unit and to its private
data block:
NAME calc_mod;
BLOCK Declaration
The BLOCK declaration lets you group global data declarations into a named or private
relocatable global data block.
identifier
is the identifier of the data block. identifier must be unique among all BLOCK and
NAME declarations in the target file. A named data block is accessible to other
compilation units in the target file.
data
declaration
;
PRIVATE
VST1102.vsd
BELOW (256)
BELOW (64)
AT (0)
END BLOCK
;
;
identifier
BLOCK