lua-users home
lua-l archive

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


Am 23.06.2016 um 16:52 schröbte Luiz Henrique de Figueiredo:
fargs, nargs = {...}, select('#', ...)

That's a job for table.pack:

	fargs = table.pack(...)
	nargs = fargs.n

One of the motivations for table.pack.

As long as Lua 5.1 (via LuaJIT) is still relevant, `table.pack` isn't really that useful since you need `{n=select('#',...),...}` anyway ...

Philipp