mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-07 23:38:47 +00:00
Procedures in interpretation
This commit is contained in:
parent
30697f19eb
commit
b4ef95c8bc
22 changed files with 337 additions and 188 deletions
32
regression/test026.expr
Normal file
32
regression/test026.expr
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
fun test1 (a) {
|
||||
write (a);
|
||||
print ()
|
||||
}
|
||||
|
||||
fun test2 (b) {
|
||||
write (b);
|
||||
print ()
|
||||
}
|
||||
|
||||
fun test3 (c) {
|
||||
write (c);
|
||||
print ()
|
||||
}
|
||||
|
||||
fun print () {
|
||||
write (a);
|
||||
write (b);
|
||||
write (c)
|
||||
}
|
||||
|
||||
a := 100;
|
||||
b := 200;
|
||||
c := 300;
|
||||
|
||||
test1 (1);
|
||||
print ();
|
||||
test2 (2);
|
||||
print ();
|
||||
test3 (3);
|
||||
print ()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue