DEADSOFTWARE

Допилен модуль CPMath
[dsw-obn.git] / Test.obn
index 0b020f71a79862e5a3510e07528b982ea6a21749..f8a3688761c9e28b3c33aad87cd805f41a96d9d1 100644 (file)
--- a/Test.obn
+++ b/Test.obn
@@ -1,11 +1,22 @@
 MODULE Test;
 
-IMPORT
-  Out,
-  System;
+IMPORT Out, CPMath, CPStrings;
+
+
+VAR
+  s : ARRAY 80 OF CHAR;
+  v, m, r, f : LONGREAL;
+  e : LONGINT;
 
 BEGIN
-  Out.Open;
-  Out.String("Hello World!"); Out.Ln;
-  System.Halt(1);
+  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.