func, state, val = IPairs(table)
IPairs()
will return three values: An
iterator function, a private state information, and an initial value for
the traversal. The iterator function returned by IPairs()
will stop the
traversal when it encounters a key whose value is set to Nil.
If you want to traverse over all fields of a table instead of just the integer indices, use the Pairs() function instead.
See Generic For statement for details.
a = {"one", "two", "three"} For i, v In IPairs(a) DebugPrint(i, v) NextThe code above will print "0 one", "1 two" and "2 three".