Procedures in interpretation

This commit is contained in:
Dmitry Boulytchev 2018-03-27 01:51:22 +03:00
parent 30697f19eb
commit b4ef95c8bc
22 changed files with 337 additions and 188 deletions

28
regression/test027.expr Normal file
View file

@ -0,0 +1,28 @@
fun print () {
write (a);
write (b);
write (c)
}
fun test1 (a) {
write (a);
print ();
write (a);
if a < 4 then
test2 (a+1);
print ()
fi
}
fun test2 (b) {
write (b);
print ();
test1 (b+1);
print ()
}
a := 100;
b := 200;
c := 300;
test1 (1)