pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

referral
is the identifier of a previously declared structure or structure pointer that is to provide the layout
for this structure.
'SG'
denotes a 16-bit system global address.
index
is an INT constant that specifies the offset of the element in previous-ident to which the
equivalenced pointer or variable refers. Specify index only with direct variables. index must
end on a word boundary.
+, -
is the word or byte offset, relative to the base of previous-ident, where the equivalenced
variable is placed. For example, if a and b are declared:
INT a[0:9];
INT b = a+5
then b is placed at a[5].
offset
an equivalent INT values in the range 0 through 63.
If you specify an indirection symbol (see Table 14 (page 41)), the structure behaves like a structure
pointer. If you do not specify an indirection symbol, the structure has direct addressing.
Example 137 Equivalenced Referral Structure Declaration
STRUCT def_struct;
BEGIN
STRING a[0:99];
REAL b[0:9];
END;
STRUCT ref_struct (def_struct) = 'SG'[30];
Equivalenced Simple Pointer
The equivalenced simple pointer declaration associates a simple pointer with a location relative
to the base address of the system global ('SG') or the extended system global ('SGX') data area.
type
is any data type except UNSIGNED and specifies the data type of the value to which the
pointer points.
Indirection
., .EXT, .EXT32, .EXT64, .SG, and .SGX are indirection symbols (see Table 14 (page 41)).
196 Equivalenced Variables