Retrieve the value of the index variable when an iterator is configured as a loop.
Syntax
int getCurrentLoopIndex()
Parameters
None.
Return values
Returns the value of the loop index variable. Returns zero (0) if it is outside the loop.
Examples
The following example obtains the current loop index:
int currentIndex = getCurrentLoopIndex();