mirror of
https://github.com/ProgramSnail/Lama.git
synced 2026-01-03 20:48:15 +00:00
Included lama compilation in root's make regression target
This commit is contained in:
parent
52ef663986
commit
89536c67e0
3240 changed files with 14640 additions and 6 deletions
27
lama-compiler/regression/test042.lama
Normal file
27
lama-compiler/regression/test042.lama
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
var n, x, i;
|
||||
|
||||
fun printArray (x) {
|
||||
var elem;
|
||||
if x.length == 0
|
||||
then skip
|
||||
else
|
||||
for i:=0, i<x.length, i:=i+1 do
|
||||
write (x[i])
|
||||
od
|
||||
fi
|
||||
}
|
||||
|
||||
n := read ();
|
||||
|
||||
x := [10, 20, 30, 40];
|
||||
|
||||
printArray (x);
|
||||
|
||||
for i:=0, i<x.length, i:=i+1 do
|
||||
x[i] := i
|
||||
od;
|
||||
|
||||
printArray (x)
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue