X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;ds=inline;f=Test.obn;h=fa347cddf19074ac48f9ac84d99c4993074f5aef;hb=7b7ff82e330bd4c42a9987709839251c5ac69089;hp=8c3a8d1458efc80ddf4837c106b664b70a3abfae;hpb=9f8036eb00032fa7f756113365cb42e05ab262df;p=dsw-obn.git diff --git a/Test.obn b/Test.obn index 8c3a8d1..fa347cd 100644 --- a/Test.obn +++ b/Test.obn @@ -1,18 +1,21 @@ MODULE Test; -IMPORT Out; +IMPORT Files, Out; VAR - msg : ARRAY 20 OF CHAR; + f : Files.File; + r : Files.Rider; + len : LONGINT; + 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); + + Files.ReadBytes(r, x, len); + Out.String(x^); Out.Ln; END Test.