X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;ds=sidebyside;f=Test.obn;h=fa347cddf19074ac48f9ac84d99c4993074f5aef;hb=ba8ed2cfa675b23cb19cba538f719a07a79ffb7f;hp=f76917867cb0d1bcb880b7e0cf655f116919947f;hpb=8c59e1e41700802575cefb289600028909c5ffc2;p=dsw-obn.git diff --git a/Test.obn b/Test.obn index f769178..fa347cd 100644 --- a/Test.obn +++ b/Test.obn @@ -1,12 +1,21 @@ MODULE Test; -VAR - i : SHORTINT; - s : SET; +IMPORT Files, Out; -PROCEDURE X; -END X; +VAR + 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.