X-Git-Url: http://deadsoftware.ru/gitweb?p=dsw-obn.git;a=blobdiff_plain;f=Test.obn;h=f8a3688761c9e28b3c33aad87cd805f41a96d9d1;hp=0f09bade1d5103f0fca051137c9cc8b9dd5656e5;hb=d9d4132f8a79f3a78166c8ee7c629f73093c2659;hpb=0b724e12457f2507d398c51dc35200d833ce9362 diff --git a/Test.obn b/Test.obn index 0f09bad..f8a3688 100644 --- a/Test.obn +++ b/Test.obn @@ -1,13 +1,22 @@ MODULE Test; -IMPORT CPStrings, Out; +IMPORT Out, CPMath, CPStrings; + VAR s : ARRAY 80 OF CHAR; + v, m, r, f : LONGREAL; + e : LONGINT; BEGIN - CPStrings.IntToString(123456789, s); - Out.String(s); Out.Ln; - CPStrings.RealToString(321.123456, s); - Out.String(s); Out.Ln; + v := CPMath.Pi(); + m := CPMath.Mantissa(v); + e := CPMath.Exponent(v); + r := CPMath.Real(m, e); + f := CPMath.Frac(v); + Out.LongReal(v, 0); Out.Ln; + Out.LongReal(m, 0); Out.Ln; + Out.Int(e, 0); Out.Ln; + Out.LongReal(r, 0); Out.Ln; + Out.LongReal(f, 0); Out.Ln; END Test.