For loop iterate through arrays and slices

This commit is contained in:
Krzosa Karol
2022-06-19 22:31:59 +02:00
parent 367562f0a8
commit aa5741203f
6 changed files with 67 additions and 14 deletions

View File

@@ -1,5 +1,4 @@
main :: (argc: int, argv: **char): int
test_arrays()
test_any()
@@ -14,6 +13,11 @@ test_arrays :: ()
assert(i+1 == array1[i])
array6: []*S64 = {&array1[0]}
for array1
*it = 0
for i := 0, i < length_of(array1), i+=1
assert(0 == array1[i])
test_any :: ()
some_int_value := 10
thing: Any = some_int_value