[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: number of parameters of a function
- From: Rici Lake <lua@...>
- Date: Mon, 5 Sep 2005 21:35:15 -0500
On 5-Sep-05, at 8:43 PM, Edwin Eyan Moragas wrote:
how can i determine the number of parameters this function
The simple answer is: it doesn't need any :) since Lua will just fill
in the missing ones with nil.
A better question would be "how can i determine the maximum number of
arguments this function will care about?". But I don't believe there is
a way of doing that.
If you really want to associate functions with introspection
information, I think you'd have to create some mechanism to do it, like
a weak-keyed table of functions whose values are the function