FILE: FuglemanClient.mesa
Last Edited by Mitchell, August 16, 1982 2:04 pm
DIRECTORY
Fugleman USING [Handle, NewFugleman, Check, SomeProc, FugleFailure];
FuglemanClient: CEDAR PROGRAM
IMPORTS Fugles: Fugleman =
BEGIN
TestError: ERROR;
SimpleTest: PROCEDURE = BEGIN
a nonsense program to show how clients invoke operations on objects implemented this way
fm: Fugles.Handle = Fugles.NewFugleman[];
anotherFm: Fugles.Handle = Fugles.NewFugleman[];
x: INT ← 1;
fm.Check[ ! Fugles.FugleFailure => ERROR TestError]; -- check the object, convert error
IF fm=anotherFm THEN ERROR TestError; -- should get unique objects
IF fm.SomeProc[1] = anotherFm.SomeProc[2] THEN x𡤂
END;
SimpleTest[ ];  -- call the test procedure
END. -- FuglemanClient
This is an example intended only to show syntactically how client programs create object instances, invoke operations on them and catch signals that those operations might generate. The files Fugleman.mesa and FuglemanImpl.mesa contain the definitions of the object interface used here and a sample implementation of it, respectively.
CHANGE LOG
Created by Mitchell, March 27, 1980 9:23 AM
Produce exemplary template
Changed by Horning: June 7, 1982 2:58 pm
Cosmetic changes for conformance with current recommendations
Changed by Horning: June 8, 1982 2:10 pm
Insert CEDAR prefix
Changed by YourName: DateTime
DescriptionOfChange