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 ~FILE: FuglemanImpl.mesa Last Edited by Mitchell, August 16, 1982 2:01 pm Implementation types Operations on a Fugleman ΚK– "Cedar" style˜Iunit– "Cedar" stylešœ™Icode– "cedar" stylešœ0™0– "cedar" stylešΟk ˜ J– "cedar" stylešœ ˜ —– "cedar" stylešœ ˜Jšœ ˜—Kšœœ ˜Kšœ™Lšœ œœΟc$˜>šœ œ˜Lšœœ˜ Lšœœœ˜Lšœœ˜ —KšΟn œœ˜"šŸ œœœ ˜6Lšœœ!˜,Lšœ˜—Kšœ™šŸœœ˜+Lšž˜Lšœ˜—šŸœœ˜+Lš œ œ œœœœž˜TLšœ˜—š Ÿœœœœœ˜SLšœœ˜.Lšœ˜L˜Lšœ˜—Kšœž˜šœ˜  modheader˜-Jšž˜—šœ(˜(Jšž˜—šœ(˜(Jšž-Πckž˜9—˜,Jšž(˜(—˜Jšž˜——J˜—…—€I