DEADSOFTWARE

Исправлены опережающие объявления локальных типов-записей, добавлены модули Oberon...
[dsw-obn.git] / Test.obn
index 0f09bade1d5103f0fca051137c9cc8b9dd5656e5..ecfde58b9f0e5fadb5eb6a9a884a62ede7a56351 100644 (file)
--- a/Test.obn
+++ b/Test.obn
@@ -1,13 +1,21 @@
 MODULE Test;
 
-IMPORT CPStrings, Out;
+TYPE
+  A = POINTER TO RECORD B : B; END;
+
+  B = POINTER TO RECORD x : A END;
 
 VAR
-  s : ARRAY 80 OF CHAR;
+  a : A;
+
+PROCEDURE Do;
+  TYPE
+    ListPtr = POINTER TO ListNode;
+    ListNode = RECORD next: ListPtr END;
+BEGIN
+END Do;
 
 BEGIN
-  CPStrings.IntToString(123456789, s);
-  Out.String(s); Out.Ln;
-  CPStrings.RealToString(321.123456, s);
-  Out.String(s); Out.Ln;
+  NEW(a);
+  a.B := NIL;
 END Test.