DIRECTORY FloatingPointCommon, FloatingPointPrivate; FloatingPointSoftImpl: CEDAR PROGRAM EXPORTS FloatingPointCommon, FloatingPointPrivate = BEGIN OPEN FloatingPointCommon, FloatingPointPrivate; currentState: PUBLIC FloatingState ¬ noCheck; SetState: PUBLIC PROC [new: FloatingState] RETURNS [old: FloatingState] = { old ¬ currentState; currentState ¬ noCheck; }; MesaFloatingSignalHandlerType: TYPE = PROC [code: Exception]; FloatingSignalHandler: MesaFloatingSignalHandlerType = {ERROR Error[code]}; Error: PUBLIC ERROR [code: Exception] = CODE; SupportedExceptionErrors: PUBLIC PROC RETURNS [ExceptionFlags] = { flags: ExceptionFlags ¬ NoExceptions; IF currentState # noCheck THEN { flags[invalidOperation] ¬ TRUE; flags[overflow] ¬ TRUE; flags[divisionByZero] ¬ TRUE; }; RETURN [flags]; }; SupportedStickyFlags: PUBLIC PROC RETURNS [ExceptionFlags] = { RETURN [NoExceptions]; }; GetStickyFlags: PUBLIC PROC RETURNS [ExceptionFlags] = { RETURN [NoExceptions]; }; SetStickyFlags: PUBLIC PROC [new: ExceptionFlags ¬ NoExceptions] RETURNS [old: ExceptionFlags] = { RETURN [NoExceptions]; }; END. Ά FloatingPointSoftImpl.mesa Copyright Σ 1989, 1991 by Xerox Corporation. All rights reserved. Russ Atkinson (RRA) July 5, 1989 10:55:16 pm PDT This operation indicates which exception flags are supported by Error. It is permitted for none of the flags to be supported by the primitive operations. This operation indicates which exception flags are supported by GetStickyFlags and SetStickyFlags. It is permitted for none of the flags to be supported. The various exceptions may have independent "sticky" flags that remember if the exception has occurred since the last call to SetStickyFlags. SetStickyFlags is provided so that procedures may save and restore the state for others. Κ–(cedarcode) style•NewlineDelimiter ™codešœ™Kšœ Οeœ7™BK™0K™šΟk ˜ Kšœ˜Kšœ˜——headšœžœž˜$Kšžœ*˜1Kšœž œ)ž˜7K˜—šœžœ˜-K˜—šΟnœžœžœžœ˜KKšœ˜Kšœ˜K˜—K˜Kšœžœžœ˜=šŸœ#žœ˜KK˜—KšŸœžœžœžœ˜-K˜šŸœžœžœžœ˜BKšœš™šKšœ%˜%šžœžœ˜ Kšœžœ˜Kšœžœ˜Kšœžœ˜K˜—Kšžœ ˜K˜K™—šŸœžœžœžœ˜>Kšœš™šKšžœ˜K˜—K˜šŸœž œžœ˜8Kšžœ˜K˜K˜—šŸœž œ%žœ˜bKšœη™ηKšžœ˜K˜K˜—Kšžœ˜K˜—…—R