Difference between revisions of "Unpack"

From OpenEUO
Jump to: navigation, search
(Created page with " unpack (list [, i [, j]]) Returns the elements from the given table. This function is equivalent to return list[i], list[i+1], ···, list[j] except that the above code ...")
 
Line 5: Line 5:
  
 
except that the above code can be written only for a fixed number of elements. By default, i is 1 and j is the length of the list, as defined by the length operator (see §2.5.5).  
 
except that the above code can be written only for a fixed number of elements. By default, i is 1 and j is the length of the list, as defined by the length operator (see §2.5.5).  
 +
 +
[[Select]]
  
 
[http://www.lua.org/manual/5.1/manual.html#2.5.5 Lua Manual - The length operator #]
 
[http://www.lua.org/manual/5.1/manual.html#2.5.5 Lua Manual - The length operator #]

Revision as of 10:50, 9 October 2010

unpack (list [, i [, j]])

Returns the elements from the given table. This function is equivalent to

    return list[i], list[i+1], ···, list[j]

except that the above code can be written only for a fixed number of elements. By default, i is 1 and j is the length of the list, as defined by the length operator (see §2.5.5).

Select

Lua Manual - The length operator #