X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Ftest.c;h=bcc8e86c8fe1c3a607d1d235ef29bd3d92c62820;hb=e9b64944925eadc5022edfee26281a4814fd9124;hp=cacf00d30d71189e19360a4b2467ba052f037858;hpb=86c0ca1aafd465a3e0d4a9d6b1af661eba483ae1;p=dsw-obn.git diff --git a/src/test.c b/src/test.c index cacf00d..bcc8e86 100644 --- a/src/test.c +++ b/src/test.c @@ -4,52 +4,27 @@ #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);" "" "VAR" - " msg : Ident;" - " print : PrintString;" + " i : INTEGER;" "" "BEGIN" - " msg := helloworld;" - " print := Out.String;" - " Out.Open;" - " print(msg);" - " Out.Ln;" - " print(\"It's works!\");" - " Out.Ln;" + " i := 4;" + " Out.Open();" + " IF i = 0 THEN" + " Out.String('Branch 0'); Out.Ln;" + " ELSIF i = 1 THEN" + " Out.String('Branch 1'); Out.Ln;" + " ELSIF i = 2 THEN" + " Out.String('Branch 2'); Out.Ln;" + " ELSE" + " Out.String('Branch else'); Out.Ln;" + " END;" + " Out.String('end'); Out.Ln;" "END Test." ;