X-Git-Url: http://deadsoftware.ru/gitweb?p=dsw-obn.git;a=blobdiff_plain;f=src%2Ftest.c;h=6a08bce11b82d1454ec2538a53e6e63d426debfa;hp=9fad93d4461223fcc752d5a79e48261711e9709d;hb=90882596d1b4b9ef59880c878118e4f9da49eede;hpb=b224b07b1d47fd3ae165d652be4a9a3a10d52181 diff --git a/src/test.c b/src/test.c index 9fad93d..6a08bce 100644 --- a/src/test.c +++ b/src/test.c @@ -8,26 +8,21 @@ static char source_test[] = "(* Main module *)" "MODULE Test;" "IMPORT Out;" + "TYPE" + " Baser = RECORD a : INTEGER; END;" + " R1 = RECORD (Baser)" + " b : R2;" + " END;" + " " + " R2 = RECORD" + " a : POINTER TO R1;" + " END;" "" "VAR" - " byte : BYTE;" - " short : SHORTINT;" - " int : INTEGER;" - " long : LONGINT;" - " real : REAL;" - " longreal : LONGREAL;" + " r : R1;" "" "BEGIN" - " Out.Open;" - " byte := 127;" - " int := 666 DIV 2;" - " long := int;" - " real := (4 / 1) - (4 / 3) + (4 / 5) - (4 / 7) + (4 / 9) - (4 / 11) + (4 / 13) - (4 / 15) + (4 / 17);" - " longreal := (4 / 1) - (4 / 3) + (4 / 5) - (4 / 7) + (4 / 9) - (4 / 11) + (4 / 13) - (4 / 15) + (4 / 17);" - " Out.Int(666, 0); Out.Ln;" - " Out.Int(byte, 0); Out.Ln;" - " Out.Real(real, 0); Out.Ln;" - " Out.LongReal(longreal, 0); Out.Ln;" + " r.a := 1;" "END Test." ;