pTAL Conversion Guide

Data Representation
pTAL Conversion Guide527302-002
4-7
Data in System Global Variables
Data in System Global Variables
The address type of pointers to system global variables is one of SGBADDR,
SGWADDR, SGXBADDR, or SGXWADDR.
TAL
.SG pointers point to system global variables.
pTAL
Both .SG and .SGX pointers point to system global variables.
pTAL allocates 16 bits for .SG pointers and 32 bits for .SGX pointers:
STRING .SG s; ! s is 16 bits for both pTAL and TAL
INT .SG i; ! i is 16 bits for both pTAL and TAL
STRING .SGX s; ! s is 32 bits for pTAL, not available in TAL
INT .SGX i; ! i is 32 bits for pTAL, not available in TAL
If you share pTAL source files with TAL programs that include pointers to system
globals, use .SG pointers.