diff --git a/src/test.c b/src/test.c
index d2950b968189c70a5f4b743c5131cd9682498959..cacf00d30d71189e19360a4b2467ba052f037858 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;"
" PrintString = PROCEDURE (str : ARRAY OF CHAR);"
""
"VAR"
- " hello : Ident;"
+ " msg : Ident;"
" print : PrintString;"
""
"BEGIN"
+ " msg := helloworld;"
" print := Out.String;"
- " hello[0] := h;"
- " hello[1] := e;"
- " hello[2] := l;"
- " hello[3] := l;"
- " hello[4] := o;"
- " hello[5] := space;"
- " hello[6] := w;"
- " hello[7] := o;"
- " hello[8] := r;"
- " hello[9] := l;"
- " hello[10] := d;"
- " hello[11] := bang;"
- " hello[12] := null;"
" Out.Open;"
- " print(hello);"
+ " print(msg);"
+ " Out.Ln;"
+ " print(\"It's works!\");"
" Out.Ln;"
"END Test."
;
-// PROCEDURE Char* (ch : CHAR);
-// PROCEDURE String* (str : ARRAY OF CHAR);
-
static char source_out[] =
"MODULE Out;"
" PROCEDURE Open*;"