Implement the while loop
This commit is contained in:
1
tests/expectations/print_after_loop.txt
Normal file
1
tests/expectations/print_after_loop.txt
Normal file
@ -0,0 +1 @@
|
||||
2
|
1
tests/expectations/print_in_proc.txt
Normal file
1
tests/expectations/print_in_proc.txt
Normal file
@ -0,0 +1 @@
|
||||
14
|
9
tests/vm/print_after_loop.elna
Normal file
9
tests/vm/print_after_loop.elna
Normal file
@ -0,0 +1,9 @@
|
||||
proc main() {
|
||||
var x: int;
|
||||
|
||||
x := 0;
|
||||
while (x < 2) {
|
||||
x := x + 1;
|
||||
}
|
||||
printi(x);
|
||||
}
|
7
tests/vm/print_in_proc.elna
Normal file
7
tests/vm/print_in_proc.elna
Normal file
@ -0,0 +1,7 @@
|
||||
proc print2(a: int) {
|
||||
printi(a);
|
||||
}
|
||||
|
||||
proc main() {
|
||||
print2(14);
|
||||
}
|
Reference in New Issue
Block a user