X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=Test.obn;h=fa347cddf19074ac48f9ac84d99c4993074f5aef;hb=ba8ed2cfa675b23cb19cba538f719a07a79ffb7f;hp=f0552a93a06abbaed7841faf482aae3f99251f7f;hpb=6d3cfbfd343c0d069896734e32a8c490f27cb7aa;p=dsw-obn.git diff --git a/Test.obn b/Test.obn index f0552a9..fa347cd 100644 --- a/Test.obn +++ b/Test.obn @@ -1,15 +1,21 @@ MODULE Test; -IMPORT Out; +IMPORT Files, Out; VAR - i : INTEGER; + f : Files.File; + r : Files.Rider; + len : LONGINT; + x : POINTER TO ARRAY OF CHAR; BEGIN - Out.Open; - i := 48; - FOR i := 32 TO i DO - Out.Int(i, 0); Out.Char(' '); - END; - Out.Ln; + 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; END Test.