X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=Test.obn;h=f8a3688761c9e28b3c33aad87cd805f41a96d9d1;hb=d9d4132f8a79f3a78166c8ee7c629f73093c2659;hp=fa347cddf19074ac48f9ac84d99c4993074f5aef;hpb=1233fb1d5d8f67a8f5e970386c1c4cbb6691ec04;p=dsw-obn.git diff --git a/Test.obn b/Test.obn index fa347cd..f8a3688 100644 --- a/Test.obn +++ b/Test.obn @@ -1,21 +1,22 @@ MODULE Test; -IMPORT Files, Out; +IMPORT Out, CPMath, CPStrings; + VAR - f : Files.File; - r : Files.Rider; - len : LONGINT; - x : POINTER TO ARRAY OF CHAR; + s : ARRAY 80 OF CHAR; + v, m, r, f : LONGREAL; + e : LONGINT; BEGIN - f := Files.Old("Test.obn"); - ASSERT(f # NIL); - Files.Set(r, f, 0); - - len := Files.Length(f); - NEW(x, len + 1); - - Files.ReadBytes(r, x, len); - Out.String(x^); 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.