diff --git a/src/test.c b/src/test.c
index cacf00d30d71189e19360a4b2467ba052f037858..cd28a2109e803224afb6a10ca56baaf18184be64 100644 (file)
--- a/src/test.c
+++ b/src/test.c
#include "../include/oberon.h"
-/*
static char source_test[] =
"(* Main module *)"
"MODULE Test;"
"IMPORT Out;"
- "VAR"
- " msg : ARRAY 20 OF CHAR;"
- "BEGIN"
- " msg := ''"
- "END Test."
-;
-*/
-
-static char source_test[] =
- "(* Main module *)"
- "MODULE Test;"
- "IMPORT Out;"
- "CONST"
- " helloworld = 'Hello World!';"
- " null = 0X;"
- " space = 020X;"
- " bang = 021X;"
- " h = 048X;"
- " e = 045X;"
- " l = 04CX;"
- " o = 04FX;"
- " w = 057X;"
- " r = 052X;"
- " d = 044X;"
""
"TYPE"
- " Ident = ARRAY 20 OF CHAR;"
- " PrintString = PROCEDURE (str : ARRAY OF CHAR);"
+ " R = RECORD iii : INTEGER; END;"
""
"VAR"
- " msg : Ident;"
- " print : PrintString;"
+ " i : INTEGER;"
+ " a : ARRAY 3 OF INTEGER;"
+ " r : R;"
""
+ "PROCEDURE X(VAR x : INTEGER);"
"BEGIN"
- " msg := helloworld;"
- " print := Out.String;"
- " Out.Open;"
- " print(msg);"
- " Out.Ln;"
- " print(\"It's works!\");"
- " Out.Ln;"
+ " x := x * 666;"
+ "END X;"
+ ""
+ "BEGIN;"
+ " r.iii := 2;"
+ " X(r.iii);"
+ " Out.Int(r.iii, 0); Out.Ln;"
"END Test."
;