TAL Programmer's Guide
10 Using Equivalenced Variables
096254 Tandem Computers Incorporated 10–1
Equivalencing lets you declare more than one identifier and description for a location
in a primary storage area. This section describes how to equivalence a new variable
to a previously declared variable. You can declare:
Equivalenced simple variables
Equivalenced simple pointers
Equivalenced structures
Equivalenced structure pointers
The new and previous variables can have different data types and byte-addressing
and word-addressing attributes. You can, for example, refer to an INT(32) variable as
two separate words or four separate bytes.
Other kinds of equivalencing are described in the TAL manual set as follows:
Information Manual Section
Redefinitions (equivalencing
within structures)
TAL Programmer’s Guide
TAL Reference Manual
8, “Using Structures”
8, “Structures” (syntax)
Base-address equivalencing TAL Reference Manual 10, “Equivalenced Variables”
'SG'-equivalencing TAL Reference Manual 15, “Privileged Procedures”
Example Diagrams The diagrams in this section show the relationship of an equivalenced variable to the
previous variable. Unless otherwise noted, the diagrams refer to memory locations
in the primary area of the user data segment. Here is a sample diagram:
The shaded box is the previous (allocated) variable
The unshaded box is the equivalenced (new) variable
INT word1;
INT word2 = word1;
WORD1 WORD2
300
Variables You Can
Equivalence
You can equivalence any variable in the first column of Table 10-1 to any variable in
the second column. (You cannot equivalence an array to another variable.)
Table 10-1. Equivalenced Variables
Equivalenced (New) Variable Previous Variable
Simple variable
Simple pointer
Structure
Structure pointer
Simple variable
Simple pointer
Structure
Structure pointer
Array
Equivalenced variable
For compatibility with future software platforms, however, equivalence indirect
structures only to indirect structures or indirect arrays.