Tuple

From OpenEUO
Revision as of 14:27, 1 November 2010 by Ximan (Talk | contribs) (Created page with "== Definition == A tuple is an ordered sequence of elements. Functions in lua can return more than one value at a time. E.g., local b = function(...) local a = {...} ...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

A tuple is an ordered sequence of elements. Functions in lua can return more than one value at a time. E.g.,

 local b = function(...)
   local a = {...}
   local c = select('#',...)
   return unpack(a)
 end


See Also