lama_byterun/lama-compiler/regression/test042.lama

27 lines
279 B
Text

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)