<<>> <> <> <> <<>> <> <> <> <<>> DIRECTORY Commander, RealConvert, Ieee, IO, Rope; TestRealConvert: CEDAR PROGRAM IMPORTS Commander, RealConvert, IO ~ BEGIN IEEE: TYPE ~ Ieee.SingleReal; BCPL: TYPE ~ RealConvert.BcplReal; GetRopeFromReal: PUBLIC PROC [r: REAL] RETURNS [returnRope: Rope.ROPE] ~ { <> returnRope ¬ IO.PutFLR["%e is %x hex, and %x BCPL hex, and %e back to real.\n", LIST[ IO.real[r], IO.int[LOOPHOLE[r]], IO.int[LOOPHOLE[RealConvert.IeeeToBcpl[r]]], IO.real[RealConvert.BcplToIeee[RealConvert.IeeeToBcpl[r]]]]]; }; TestCommander: Commander.CommandProc ~ { s: IO.STREAM = IO.RIS[cmd.commandLine]; number: REAL = IO.GetReal[s]; IO.PutRope[cmd.out, GetRopeFromReal[number]]; }; Commander.Register["TestReal", TestCommander, "Print out real values before and after conversions."]; END.