X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=Test.obn;h=fa347cddf19074ac48f9ac84d99c4993074f5aef;hb=0b68ac1af511e1e47b1e6a8f5617200db6819ee5;hp=8249fb77223116fd24082f63a7dba78821d98fe1;hpb=d54469555328facc1c3b20e741b0bc3d2061685d;p=dsw-obn.git diff --git a/Test.obn b/Test.obn index 8249fb7..fa347cd 100644 --- a/Test.obn +++ b/Test.obn @@ -1,8 +1,21 @@ MODULE Test; -IMPORT Out; +IMPORT Files, Out; + +VAR + f : Files.File; + r : Files.Rider; + len : LONGINT; + x : POINTER TO ARRAY OF CHAR; BEGIN - Out.Open; - Out.String("Hello World!"); 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.