lua-users home
lua-l archive

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

On Tue, Feb 23, 2010 at 06:59:35PM +0100, Petite Abeille wrote:
> On Feb 23, 2010, at 6:50 PM, spir wrote:
> > PS: What about named args in Lua? After all, an arg list is a kind of table...
> "named args" in Lua are tables 

long answer: you use a table as the single parameter.

You can omit the () when calling a function with a table constructor,
so it looks almost like a plain call

somefunc{'foo', 'bar', baz = 42}