Makes a Xar work in a for loop: it is the element (a pointer with for *) and it_index its index. Do not add during the loop. Reverse loops are a compile error.
array: Xar(int, 2, 4);
for 1..3 xar_add(*array, it);
total := 0;
for array total += it * it_index;
assert(total == 8);
xar_reset(*array);for_expansion :: (array: *$T/Xar, body: Code, flags: For_Flags)
Parameters
- array: *$T/Xar
- body: Code
- flags: For_Flags