Community
Participate
Working Groups
It would be nice to have an index variable in an FOR loop. Example: «FOR item:list INDEX index» «index.index0» // a counter starting at 0 «index.index1» // a counter starting at 1 «index.isFirst» // true for the first item in the list «index.isLast» // true for the last item in the list «ENDFOR»
I assume there would also be something like «index.value» to retrieve the index of the current item in the iterable.
That would be either #getIndexZeroBased or #getIndexOneBased / #index0 / #index1
OK. I didn't quite understand the "a counter starting at 0" comment at first.