diff --git a/src/test.c b/src/test.c
index bbf6b3938c810ed3babf5acb9c60f9a909b290ef..549e5eaa69e890f6c70b2c053474152028f2f571 100644 (file)
--- a/src/test.c
+++ b/src/test.c
static char source_test[] =
"(* Main module *)"
"MODULE Test;"
static char source_test[] =
"(* Main module *)"
"MODULE Test;"
- "TYPE"
- " Rec = POINTER TO RecDesc;"
- " RecDesc = RECORD x, y, z : INTEGER END;"
+ "IMPORT Out;"
+ ""
"VAR"
"VAR"
- " a : INTEGER;"
- " r : Rec;"
+ " i : INTEGER;"
+ ""
"BEGIN"
"BEGIN"
- " NEW(r);"
- " a := 123;"
- " a := -(3 * a + 456);"
- " r.x := a;"
- " r.y := r.x;"
- " r.z := r.y * 3;"
+ " i := 0;"
+ " Out.Open();"
+ " WHILE i < 4 DO"
+ " Out.String('Count '); Out.Int(i, 0); Out.Ln;"
+ " i := i + 1;"
+ " END;"
+ " Out.String('end'); Out.Ln;"
"END Test."
;
static char source_out[] =
"MODULE Out;"
"END Test."
;
static char source_out[] =
"MODULE Out;"
-// "(* Interface to outer program ;) *)"
-// "VAR"
-// " Open- : PROCEDURE;"
-// " Char- : PROCEDURE(ch : CHAR);"
-// " String- : PROCEDURE(str : ARRAY OF CHAR)"
-// " Int- : PROCEDURE(i, n : LONGINT);"
-// " Int- : PROCEDURE(i, n : INTEGER);"
-// " Real- : PROCEDURE(x : REAL; n : INTEGER);"
-// " LongReal- : PROCEDURE(x : LONGREAL; n : INTEGER);"
-// " Ln- : PROCEDURE;"
+ " PROCEDURE Open*;"
+ " END Open;"
+ ""
+ " PROCEDURE Char* (ch : CHAR);"
+ " END Char;"
+ ""
+ " PROCEDURE String* (str : ARRAY OF CHAR);"
+ " END String;"
+ ""
+ " PROCEDURE Int*(i, n : LONGINT);"
+ " END Int;"
+ ""
+ " PROCEDURE Real*(x : REAL; n : INTEGER);"
+ " END Real;"
+ ""
+ " PROCEDURE LongReal*(x : LONGREAL; n : INTEGER);"
+ " END LongReal;"
+ ""
+ " PROCEDURE Ln*;"
+ " END Ln;"
+ ""
"END Out."
;
"END Out."
;