elna/tests/vm/array_with_variable_index.elna

12 lines
126 B
Plaintext

proc main() {
var a: array[2] of int;
var i: int;
i := 1;
a[0] := 5;
a[i] := 7;
printi(a[0]);
printi(a[i]);
}