[Next] [Up] [Previous]

The EQUIVALENCE Statement

The EQUIVALENCE statement
(EQUIV, EQU, EQ)

A typical EQUIVALENCE statement might look like

       EQUIVALENCE (RMX,VVLQ),(JN,WBB(8),XZ,L),((A,B,C,D),Q)

where all variables inside the first level of parentheses are to begin at the same memory location (thus, changing one automatically changes the other). Items in the second level of parentheses follow each other in memory.

Thus, the statements

       REAL X(3),A,B,C
       EQUIVALENCE (X,(A,B,C))

make X(1) equivalent to A, X(2) equivalent to B, and X(3) equivalent to C.

Array elements can be referred to in EQUIVALENCE statements as well, thus specifying the position of the whole array, but with a displacement.


[Next] [Up] [Previous]