diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/expectations/array_with_variable_index.txt | 2 | ||||
| -rw-r--r-- | tests/vm/array_with_variable_index.elna | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/expectations/array_with_variable_index.txt b/tests/expectations/array_with_variable_index.txt new file mode 100644 index 0000000..b3172d1 --- /dev/null +++ b/tests/expectations/array_with_variable_index.txt @@ -0,0 +1,2 @@ +5 +7 diff --git a/tests/vm/array_with_variable_index.elna b/tests/vm/array_with_variable_index.elna new file mode 100644 index 0000000..c3449b3 --- /dev/null +++ b/tests/vm/array_with_variable_index.elna @@ -0,0 +1,11 @@ +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]); +} |
