Implemented loop iterators
This commit is contained in:
parent
1bc845e6f0
commit
7922cff7ba
17 changed files with 147 additions and 35 deletions
20
tests/programs/index-static.q
Normal file
20
tests/programs/index-static.q
Normal file
|
@ -0,0 +1,20 @@
|
|||
import mem
|
||||
|
||||
main() {
|
||||
a := mem.alloc(4)
|
||||
|
||||
assert a[0] == 0
|
||||
assert a[1] == 0
|
||||
assert a[2] == 0
|
||||
assert a[3] == 0
|
||||
|
||||
a[0] = 0
|
||||
a[1] = 1
|
||||
a[2] = 2
|
||||
a[3] = 3
|
||||
|
||||
assert a[0] == 0
|
||||
assert a[1] == 1
|
||||
assert a[2] == 2
|
||||
assert a[3] == 3
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue