pTAL Conversion Guide

Equivalenced Variables
pTAL Conversion Guide527302-002
12-5
Declaring Equivalenced Nonstructures
referral
is the identifier of a previously declared structure, structure layout, or structure
pointer.
previous-identifier
the identifier of a previously-declared variable, direct array element, pointer,
structure, structure pointer, or equivalenced variable.
index
is an INT constant that specifies an element offset from 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
is an INT constant that specifies a word offset from previous-identifier,
which can be a direct or indirect variable. If previous-identifier is indirect,
the offset is from the location of the pointer, not from the location of the data
pointed to.
Example 12-2. Equivalenced Nonstructure Declarations
INT a;
INT b = a;
INT(32) c[0:3];
INT d[0:7] = c;