<> <> DIRECTORY Fugleman; FuglemanStdImpl: CEDAR PROGRAM EXPORTS Fugleman = BEGIN OPEN Fugleman; <> Handle: TYPE = REF Rep; -- declare the concrete type locally Rep: PUBLIC TYPE = RECORD[ count: INT, flag: BOOLEAN _ TRUE, mumble: INT]; FugleFailure: PUBLIC ERROR = CODE; NewFugleman: PUBLIC PROCEDURE RETURNS [Handle] = BEGIN RETURN [NEW[Rep _ [count: 5, mumble: -10]]]; END; <> Print: PUBLIC PROCEDURE [h: Handle] = BEGIN -- some body would go here END; Check: PUBLIC PROCEDURE [h: Handle] = BEGIN IF h.count>100 OR h.mumble<0 AND NOT h.flag THEN ERROR FugleFailure; -- example only END; SomeProc: PUBLIC PROCEDURE [h: Handle, otherArgument: INT] RETURNS [r: INT] = BEGIN IF otherArgument>100 THEN otherArgument _ 100; h.count _ otherArgument; r _ 17; END; END. -- FuglemanStdImpl CHANGE LOG Created by Mitchell: March 17, 1980 11:33 AM Exemplary template Changed by Horning: June 7, 1982 6:17 pm Use Mesa.abbreviations Changed by Horning: June 8, 1982 2:15 pm Fix the use of the exported opaque type, add CEDAR prefix Changed by Mitchell: August 15, 1982 8:55 pm added needed declaration of FugleFailure Changed by YourName: DateTime DescriptionOfChange