diff --git a/src/test.c b/src/test.c
index 3305807bbb3fa1c87b0cbd508aaec7e6787ebbfb..125c5df07d2f017942479ff9a7ed5e979f86b4f2 100644 (file)
--- a/src/test.c
+++ b/src/test.c
"MODULE Test;"
"IMPORT Out;"
"TYPE"
"MODULE Test;"
"IMPORT Out;"
"TYPE"
- " Callback = PROCEDURE;"
- " Callfront = PROCEDURE(x : LONGINT) : LONGINT;"
- " RecDesc = RECORD"
- " cb : Callback;"
- " cf : Callfront;"
- " END;"
+ " RecA = POINTER TO RecADesc;"
+ " RecADesc = RECORD END;"
""
""
- "VAR"
- " r : RecDesc;"
- " i : LONGINT;"
- ""
- "PROCEDURE Stuff;"
- "BEGIN"
- " Out.Int(0123456789, 0); Out.Ln;"
- "END Stuff;"
+ " RecB = POINTER TO RecBDesc;"
+ " RecBDesc = RECORD (RecADesc) END;"
""
""
- "PROCEDURE Ffuts (x : LONGINT) : LONGINT;"
- "BEGIN"
- " RETURN 9876543210 + x;"
- "END Ffuts;"
+ "VAR"
+ " pra : RecA;"
+ " prb : RecB;"
+ " ra : RecADesc;"
+ " rb : RecBDesc;"
""
"BEGIN"
""
"BEGIN"
- " Out.Open;"
- " Out.Int(1, 0); Out.Ln;"
- " r.cb := Stuff;"
- " Out.Int(2, 0); Out.Ln;"
- " r.cb();"
- " Out.Int(3, 0); Out.Ln;"
- " r.cf := Ffuts;"
- " Out.Int(4, 0); Out.Ln;"
- " i := r.cf(0123456789);"
- " Out.Int(i, 0); Out.Ln;"
+ " pra := prb;"
+ " prb := pra(RecB);"
+ " ra := prb^;"
"END Test."
;
"END Test."
;