Top: f77 Up: 13 - Statements
Previous: 13,29 - ENTRY Next: 13,31 - EXTERNAL


Section 13,30: EQUIVALENCE

 Starts two or more data elements in one program unit at the same
 storage location, thereby overlaying them in memory.  Statement
 format:

    EQUIVALENCE (nlist)[,(nlist)]...

    nlist  Is a list of variables, array elements, arrays, 
           or character substring references, separated by 
           commas.  You must specify at least two of these 
           entities in each list.

 The elements named within each set of parentheses are given the
 same storage location.  The data elements do not have to be of the
 same type or length.  An equivalency begins with the first byte of
 each element.  When an array or substring element is equivalenced,
 the entire array or string is equivalenced in its normal linear
 storage.

 You cannot equivalence array or string elements in a manner that is
 inconsistent with their normal linear order.  You cannot
 equivalence elements of the same array or string.  You cannot
 equivalence two elements that are both in common areas.

 Records, record fields, and dummy arguments cannot be specified in
 EQUIVALENCE statements.

 You can identify a multidimensional array element by a single
 subscript.  The single subscript designates the absolute position
 of the element within the array.


Top: f77 Up: 13 - Statements
Previous: 13,29 - ENTRY Next: 13,31 - EXTERNAL