MODULE; IMPORT ObLib, ObValue, Obliq, SynLocation; PROCEDURE ObLongReal M3ToObliq (val : LONGREAL) : ObValue.Val = BEGIN RETURN NEW (ObValue.ValReal, real := val); END M3ToObliq; PROCEDUREObliqToM3 (val : ObValue.Val) : LONGREAL RAISES {ObValue.Error} = BEGIN TYPECASE val OF | ObValue.ValReal (node) => RETURN node.real; | ObValue.ValInt (node) => RETURN FLOAT (node.int, LONGREAL); ELSE Obliq.RaiseError ("Expected Real or Int"); RETURN 0.0d0; (* ... only to suppress compiler warning *) END; END ObliqToM3; PROCEDUREGetArg (args : ObValue.ArgArray; idx : INTEGER; package : ObLib.T; opCode : ObLib.OpCode; loc : SynLocation.T) : LONGREAL RAISES {ObValue.Error} = BEGIN TYPECASE args[idx] OF | ObValue.ValReal (node) => RETURN node.real; | ObValue.ValInt (node) => RETURN FLOAT (node.int, LONGREAL); ELSE ObValue.BadArgType (idx, "real", package.name, opCode.name, loc); RETURN 0.0d0; (* ... only to suppress compiler warning *) END; END GetArg; BEGIN END ObLongReal.