diff --git a/Test.obn b/Test.obn
index 8c3a8d1458efc80ddf4837c106b664b70a3abfae..c80345e560b5ed362e18a58a9a1abc772b084c44 100644 (file)
--- a/Test.obn
+++ b/Test.obn
MODULE Test;
-IMPORT Out;
+IMPORT Files, Out;
VAR
- msg : ARRAY 20 OF CHAR;
+ f : Files.File;
+ r : Files.Rider;
+ i, len : LONGINT;
+ g : SHORTINT;
+ x : POINTER TO ARRAY OF CHAR;
BEGIN
- Out.Open;
- COPY("Hello World!", msg);
- Out.String(msg); Out.Ln;
- COPY("Hell!", msg);
- Out.String(msg); Out.Ln;
- COPY("The quick brown fox jumps over the lazy dog", msg);
- Out.String(msg); Out.Ln;
- msg := "Hello World!";
- Out.String(msg); Out.Ln;
+ f := Files.Old("Test.obn");
+ ASSERT(f # NIL);
+ Files.Set(r, f, 0);
+ len := Files.Length(f);
+ NEW(x, len + 1);
+ FOR i := 0 TO len - 1 DO Files.Read(r, g); x[i] := CHR(g) END;
+ Out.String(x^); Out.Ln;
END Test.