cellsyndec ::=xcellsyndec|rcellsyndec|xxcellsyndec|rrcellsyndec αcellsyndec ::=αtype αsynlist; {α=x|r|xx|rr} αsynlist ::=αsyn|αsynlist,αsyn {α=x|r|xx|rr} αsyn ::=αidentifier SYN fixedcell|αidentifier SYN(integer)| αidentifier SYN (integer)=αinitial {α=x|r|xx|rr} accsyndec ::=xaccsyndec|raccsyndec|xxacsyndec|rracsyndec αaccsyndec ::=ACC αaccsynlist, αaccsyn {α=x|r|xx|rr} αaccsynlist ::=αaccsyn|αaccsynlist, αaccsyn {α=x|r|xx|rr} αaccsyn ::=αidentifier SYN αacc {α=x|r|xx|rr} αfixedcell ::=αidentifier|αidentifier(integer)|αidentifier(-integer) {α=x|r|xx|rr}
It is sometimes convenient to refer to a cell by more than one name, to give individual array elements names of their own or to treat a real array as two integer cells on occasions. It often increases the readability of a program if the same cell is used for more than one purpose.
A cell synonym declaration consists of the type of the new cells being declared followed by a list of individual synonyms. Each synonym consists of the identifier chosen for the new cell followed by the word SYN and the designator of the cell which is to be given the extra identifier. For example:
BASE; INTEGER A(20),B,C(10); REAL D(10),E,F; INTEGER NEWB SYN B,C3 SYN C(2),H SYN C(-3); INTEGER J SYN (3), K SYN (30)=#77000; INTEGER L SYN E, M SYN E(1); LONG REAL T SYN D;
In the first example NEWB is the name also given to the cell B. The cell designator must be a fixed cell which means that it can either be an identifier or an identifier followed by a fixed index. The second example sets the name C3 to the third item of the C array, C(2). If an index is used then it should not be such that it designates a cell in a different domain to the identifier. Thus:
INTEGER N SYN A(-1),P SYN A(4100);
are not allowed. Note that only fixed indexes are allowed.
For example:
INTEGER Q SYN A(X1);
is illegal. The identifier following the SYN must have already been declared by a normal or synonym declaration. For example:
INTEGER A; INTEGER B SYN A; INTEGER C SYN B;
is allowed.
There is no reason why a cell of one type should not be given a synonym of a different type. In the last example, the integer identifiers L and M refer to the top and bottom halves of the cell E.
Cell synonyms may also be used to give names to absolute store locations. In this case only initial values can also be assigned as long as they do not affect the loading process. The examples above assign the name J to store location 3 which is X3. The second example gives store location 30 the name K and initialises it to have the value #77000.
To assign extra identifiers to accumulators, the accumulator synonym declaration must be used. This is similar to a cell synonym declaration but the type is replaced by the symbol ACC and only accumulator identifiers may follow SYN. Examples are:
ACC I SYN X1, J SYN X2, IJ SYN X3, SUM SYN A1, S SYN A12;
The new identifiers can then be used whenever the corresponding fixed accumulator identifier could be used. For example:
J:=LIX; SUM:=SUM+URX(X1+2);