WoW:API ipairs: Difference between revisions

33 bytes added ,  26 December 2005
m
no edit summary
No edit summary
 
mNo edit summary
Line 1: Line 1:
Wrapper for lua function ipairs(t):
Comes from the native LUA API:


Used in loop constructs to iterate through the values of a table where there is no index (an array).
Used in loop constructs to iterate through the values of a table where the index are only numbers, or where there is no index (an array).


Example:
Example:


  local fruits={"apple","orange","banana",kiwi"}
  local fruits={"apple","orange","banana","kiwi"}


  for index,value in ipairs(fruits) do  
  for index,value in ipairs(fruits) do  
Anonymous user