X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=Test.obn;h=3c862c1d5917486426e84aa32439b268bb8baf88;hb=8620d81a0d78c987b250a7a471d76d96af461846;hp=8249fb77223116fd24082f63a7dba78821d98fe1;hpb=d54469555328facc1c3b20e741b0bc3d2061685d;p=dsw-obn.git diff --git a/Test.obn b/Test.obn index 8249fb7..3c862c1 100644 --- a/Test.obn +++ b/Test.obn @@ -1,8 +1,28 @@ MODULE Test; -IMPORT Out; +TYPE + Object = RECORD + mth : PROCEDURE; + END; + +VAR + p : PROCEDURE; + o, a : Object; + +PROCEDURE X; +END X; + +PROCEDURE Z(VAR g : Object); +BEGIN + g.mth; +END Z; BEGIN - Out.Open; - Out.String("Hello World!"); Out.Ln; + p := X; + ASSERT(p # NIL); + o.mth := X; + ASSERT(o.mth # NIL); + a := o; + ASSERT(a.mth # NIL); + Z(a); END Test.