lua-users home
lua-l archive

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

> I may have asked this before, but is there any way to ask Lua for the
> number of arguments that a given Lua function expects?

It wouldn't be difficult to implement a built-in function "num_params",
which returns the number of parameters a function expects. However, it would
not work neither for C functions nor for vararg functions. So, it doesn't
seem very useful as a generic facility.

-- Roberto