Method lfun::_iterator_index()


Method _iterator_index

optional mixed _iterator_index()

Description

Called in Iterator objects by foreach (optional).

Returns

Returns the current index for an iterator, or UNDEFINED if the iterator doesn't point to any item. If this function is not present, the return value from lfun::_iterator_next() will be used.

If there's no obvious index set then the index is the current position in the data set, counting from 0 (zero).

See also

iterator_index(), lfun::_iterator_next(), lfun::_iterator_prev(), lfun::_iterator_value()