X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=Test.obn;h=fa347cddf19074ac48f9ac84d99c4993074f5aef;hb=0b68ac1af511e1e47b1e6a8f5617200db6819ee5;hp=82fbedbbc7c705e6e6a7a46f3cfb2a2e3c34c7d2;hpb=2985d77f3ee4af98761b28b4ce1e57582d8c8619;p=dsw-obn.git diff --git a/Test.obn b/Test.obn index 82fbedb..fa347cd 100644 --- a/Test.obn +++ b/Test.obn @@ -1,9 +1,21 @@ MODULE Test; +IMPORT Files, Out; + VAR - i : SHORTINT; - s : SET; + f : Files.File; + r : Files.Rider; + len : LONGINT; + x : POINTER TO ARRAY OF CHAR; BEGIN - i := SHORT(12345); + 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.