X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Ftest.c;h=125c5df07d2f017942479ff9a7ed5e979f86b4f2;hb=e6a70a3b694efa5600cfcd0d8110f8d9e8866342;hp=9fad93d4461223fcc752d5a79e48261711e9709d;hpb=d11b76dfc015306841ed4befae800ba1ed7c765b;p=dsw-obn.git diff --git a/src/test.c b/src/test.c index 9fad93d..125c5df 100644 --- a/src/test.c +++ b/src/test.c @@ -8,26 +8,23 @@ static char source_test[] = "(* Main module *)" "MODULE Test;" "IMPORT Out;" + "TYPE" + " RecA = POINTER TO RecADesc;" + " RecADesc = RECORD END;" + "" + " RecB = POINTER TO RecBDesc;" + " RecBDesc = RECORD (RecADesc) END;" "" "VAR" - " byte : BYTE;" - " short : SHORTINT;" - " int : INTEGER;" - " long : LONGINT;" - " real : REAL;" - " longreal : LONGREAL;" + " pra : RecA;" + " prb : RecB;" + " ra : RecADesc;" + " rb : RecBDesc;" "" "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;" + " pra := prb;" + " prb := pra(RecB);" + " ra := prb^;" "END Test." ;