OpaqueTest.mesa
Copyright Ó 1991 by Xerox Corporation. All rights reserved.
Spreitze, January 9, 1992 7:05 pm PST
Laurie Horton, March 20, 1992 9:25 am PST
DIRECTORY
StdCorpse5OpaqueTest USING[OpaqueRef, MakeNewOpaqueRef],
RefTab, Rope;
OpaqueTest:
CEDAR
PROGRAM
IMPORTS StdCorpse5OpaqueTest, RefTab
= BEGIN
Zorch: TYPE ~ REF Zorch;
z0: Zorch ← NIL;
z1: Zorch ← NEW[Zorch ← z0];
z2: Zorch ← NEW[Zorch ← z1];
DoOpaqueTest:
PROC ~ {
var: StdCorpse5OpaqueTest.OpaqueRef ← StdCorpse5OpaqueTest.MakeNewOpaqueRef[];
reftab: RefTab.Ref ← RefTab.Create[];
a: INT ← 19;
h: CARD ← 7;
g: INT ← -3;
[] ← RefTab.Insert[reftab, var, NEW[INT ← a]];
[] ← RefTab.Fetch[reftab, var];
a ← a + 23;
h ← g;
};
DoOpaqueTest[];
END.