TAL Reference Manual

Equivalenced Variables
TAL Reference Manual526371-001
10-8
Usage Considerations
identifier
is the identifier of a referral structure to be made equivalent to previous-identifier.
referral
is the identifier of a previously declared structure or structure pointer that provides
the structure layout for
identifier.
previous-identifier
is the identifier of a previously declared simple variable, array, simple pointer,
structure, structure pointer, or equivalenced variable.
index
is an INT constant that specifies an element offset from previous-identifier, which
must be a direct variable. The data type of
previous-identifier dictates the element
size. The location represented by
index must begin on a word boundary.
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.
Usage Considerations
If the new structure is to occupy the same location as the previous variable, their
addressing modes should match. Thus, you can declare a direct or indirect structure
equivalent to the following previous variables:
If the previous variable is a structure pointer, the new structure is really a pointer, as
described in the
TAL Programmers Guide.
For portability to future software platforms, declare equivalenced variables that fit
entirely within the previous variable.
New Structure Previous Variable
Direct Structure Simple Variable
Direct Structure
Direct Array
Standard Indirect Structure Standard Indirect Structure
Standard Indirect Array
Standard Structure Pointer
Extended Indirect Structure Extended Indirect Structure
Extended Indirect Array
Extended Structure Pointer