Basically it would work exactly like Coco's Range Function.
Since it seems that Switch-case will be implemented as an alternative to if-else-if, why not implement a Range object as an alternative to Loop.
Points in favor:
- Define a name other than A_Index as our counter.
- Very useful in these situations and similar:
You can even avoid creating a temporary variable in some cases.
Code: Select all
VarSetCapacity(STRUCT, 4 * 8) for i in range(0, 4*8, 4) NumPut(0xFFFFFF, &STRUCT + i, "UInt") ; vs Loop 8 NumPut(0xFFFFFF, &STRUCT + (A_Index - 1) * 4, "UInt")