pTAL Reference Manual (H06.08+)

Equivalenced Variables
HP pTAL Reference Manual523746-006
11-26
Equivalenced Referral Structure
.EXT
.SG
.SGX
are indirection symbols (see Table 2-7 on page 2-7).
identifier
is the identifier of a referral structure to be made equivalent to 'SG'.
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 2-7, Indirection Symbols, on page 2-7),
the structure behaves like a structure pointer. If you do not specify an indirection
symbol, the structure has direct addressing.
Example 11-16. Equivalenced Referral Structure Declaration
STRUCT def_struct;
BEGIN
STRING a[0:99];
REAL b[0:9];
END;
STRUCT ref_struct (def_struct) = 'SG'[30];