X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=Test.obn;h=f8a3688761c9e28b3c33aad87cd805f41a96d9d1;hb=d9d4132f8a79f3a78166c8ee7c629f73093c2659;hp=69389899cad06413cb1824a0829eef066767864d;hpb=023ef0d8349acdfe751bba1b50749361682f72ff;p=dsw-obn.git diff --git a/Test.obn b/Test.obn index 6938989..f8a3688 100644 --- a/Test.obn +++ b/Test.obn @@ -1,23 +1,22 @@ MODULE Test; -TYPE - File* = POINTER TO Handle; +IMPORT Out, CPMath, CPStrings; - Handle = RECORD END; - Rider* = RECORD - eof* : BOOLEAN; - res* : LONGINT; - END; +VAR + s : ARRAY 80 OF CHAR; + v, m, r, f : LONGREAL; + e : LONGINT; -PROCEDURE Old*(name : ARRAY OF CHAR) : File; BEGIN - RETURN NIL -END Old; - -PROCEDURE New*(name : ARRAY OF CHAR) : File; -BEGIN - RETURN NIL -END New; - + 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.