For loop iterate through arrays and slices
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user