FOREACH element number

Previous topic - Next topic

Kitty Hello

Code (glbasic) Select

FOR i% = 0 TO LEN(mytypes[])-1
   ALIAS reference AS mytypes[i%]

   reference.xy = 1234
NEXT


Almost as fast as the FOREACH. The advantage of FOREACH is, that it won't use the [ ] operator, thus no multiplications. It's just adding to the pointer.