Spec changed; Changes introduced; fixed minor bugs

This commit is contained in:
Dmitry Boulytchev 2021-02-01 10:39:12 +03:00
parent 7c7ef67e1d
commit 59f78fe38a
6 changed files with 49 additions and 23 deletions

View file

@ -1,15 +1,16 @@
printf ("if, case, for, while, repeat etc. are all expressions.\n");
printf ("if, case, for, while etc. are all expressions.\n");
printf ("Case-expression: %s\n", case A (1, 2, 3) of A (x, y, z) -> z esac.string);
printf ("If-expression: %s\n", (if true then 2 else 3 fi +
if false then 6 else 7 fi).string);
printf ("Scope-expression: %s\n", {local i, s = 0;
printf ("Scope-expression: %s\n", (var i, s = 0;
for i := 0, i < 10, i := i + 1 do
s := s + i
od;
s
}.string
).string
)