X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=Test.obn;h=c80345e560b5ed362e18a58a9a1abc772b084c44;hb=7b989fe6cfb3cf6e529b888bb6827714c45c62c6;hp=b80d7a15c3a490308c7b343ab2843e710f22efde;hpb=49ad3c76fc9656759aab23d9034ebc33f8d8bd9d;p=dsw-obn.git diff --git a/Test.obn b/Test.obn index b80d7a1..c80345e 100644 --- a/Test.obn +++ b/Test.obn @@ -1,22 +1,20 @@ MODULE Test; -TYPE - R1 = RECORD END; - R2 = RECORD (R1) END; - R3 = RECORD END; - - P1 = POINTER TO R1; - P2 = POINTER TO R2; +IMPORT Files, Out; VAR - a : R1; - b : R2; - c : R3; - p1 : P1; - p2 : P2; + f : Files.File; + r : Files.Rider; + i, len : LONGINT; + g : SHORTINT; + x : POINTER TO ARRAY OF CHAR; BEGIN - a := b; - p2 := p1(P2); - p1 := p2(P2); + f := Files.Old("Test.obn"); + ASSERT(f # NIL); + Files.Set(r, f, 0); + len := Files.Length(f); + NEW(x, len + 1); + FOR i := 0 TO len - 1 DO Files.Read(r, g); x[i] := CHR(g) END; + Out.String(x^); Out.Ln; END Test.