StdCorpse5.mesa
Copyright Ó 1991, 1992 by Xerox Corporation. All rights reserved.
Spreitze, January 9, 1992 7:05 pm PST
Laurie Horton, March 4, 1992 8:49 pm PST
DIRECTORY
Commander USING[Register, CommandProc],
IO,
StdCorpse5OpaqueTest USING[OpaqueRef, MakeNewOpaqueRef],
PFS USING[PATH, PathFromRope],
RefTab, Rope;
StdCorpse5:
CEDAR
PROGRAM
IMPORTS Commander, IO, StdCorpse5OpaqueTest, PFS, RefTab
= BEGIN
Zorch: TYPE ~ REF Zorch;
z0: Zorch ¬ NIL;
z1: Zorch ¬ NEW[Zorch ¬ z0];
z2: Zorch ¬ NEW[Zorch ¬ z1];
Test: Commander.CommandProc = {
linein: IO.STREAM ~ IO.RIS[cmd.commandLine];
rope: Rope.ROPE ~ IO.GetTokenRope[linein, IO.IDProc].token;
name: PFS.PATH ~ PFS.PathFromRope[rope];
ERROR};
DoOpaqueTest: Commander.CommandProc ~ {
path: PFS.PATH ¬ PFS.PathFromRope["This/is/a/test/path/for/opaque/types/in/OpaqueTestTester.mesa"];
var: StdCorpse5OpaqueTest.OpaqueRef ¬ StdCorpse5OpaqueTest.MakeNewOpaqueRef[];
reftab: RefTab.Ref ¬ RefTab.Create[];
a: INT ¬ 19;
[] ¬ RefTab.Insert[reftab, path, NEW[INT ¬ a]];
[] ¬ RefTab.Fetch[reftab, path];
a ¬ a + 23;
};
Commander.Register["StdCorpse5.Test", Test, "Raise the unnamed ERROR"];
Commander.Register["StdCorpse5.DoOpaqueTest", DoOpaqueTest, "Test REF and OPAQUE types"];
END.