lua-users home
lua-l archive

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


>   function pack(...)
>     return arg
>   end
> 
>   t = pack()
> 
>   print(t.n) ---> "0"
> 
> 
> Is the arg.n field inside vararg functions by design?

The use of "arg" inside vargars function is only supported for compatibility.
If you need a table with all args, use {...}. No need for pack.
--lhf