lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Thursday, February 7, 2002, at 09:17  PM, Bansard Stephane wrote:
Could anyone tell me how to write a function to create a string array
(like the %w notation in ruby or Perl) ? (or redirect me to the right place in
the doc!)
 ex: f(a, b, c) would return {"a", "b", "c"}

Hi Bansard,

  function f(...) return arg end

should do the trick.

Steve