X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=Test.obn;h=3c862c1d5917486426e84aa32439b268bb8baf88;hb=10288ed60f876a14746b17976fd9d84ed58042cc;hp=8c3a8d1458efc80ddf4837c106b664b70a3abfae;hpb=9f8036eb00032fa7f756113365cb42e05ab262df;p=dsw-obn.git diff --git a/Test.obn b/Test.obn index 8c3a8d1..3c862c1 100644 --- a/Test.obn +++ b/Test.obn @@ -1,18 +1,28 @@ MODULE Test; -IMPORT Out; +TYPE + Object = RECORD + mth : PROCEDURE; + END; VAR - msg : ARRAY 20 OF CHAR; + p : PROCEDURE; + o, a : Object; + +PROCEDURE X; +END X; + +PROCEDURE Z(VAR g : Object); +BEGIN + g.mth; +END Z; 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; + p := X; + ASSERT(p # NIL); + o.mth := X; + ASSERT(o.mth # NIL); + a := o; + ASSERT(a.mth # NIL); + Z(a); END Test.