pTAL Reference Manual (H06.08+)
Compiler Directives
HP pTAL Reference Manual—523746-006
17-21
BLOCKGLOBALS
BLOCKGLOBALS
BLOCKGLOBALS determines how the compiler allocates global data that is not
declared within the scope of a named data block or the private data block.
If you specify BLOCKGLOBALS, the compiler allocates its own data block for each
global variable that is not declared in the scope of a named data block or the private
data block. The name of the data block is the same as the name of the variable
contained in the data block.
Separately compiled modules can share access to a data block only if both modules
allocate the block in the small data area or both modules allocate the block in the large
data area.
References to data in the small data area are faster than references to data in the
large data area.
All data blocks in a shared run-time library must be allocated in the large data area.
Default: The compiler allocates data items in the _GLOBAL and $_GLOBAL data
blocks
Placement: Before the first data declaration in a compilation
Scope: Applies to the compilation unit
Dependencies: None
Table 17-3. Data Block Names
Declaration Without BLOCKGLOBALS With BLOCKGLOBALS
INT a; _GLOBAL A
INT .a; _GLOBAL A
INT .EXT a; _GLOBAL A
INT a[0:9] _GLOBAL A
STRUCT a;
BEGIN
INT i;
END
_GLOBAL A
int .ext a [0:9] $_GLOBAL A
struct .ext a;
begin
int i;
end;
$_GLOBAL A
VST658.vsd
BLOCKGLOBALS










