[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: number of parameters of a function
- From: Edwin Eyan Moragas <haaktu@...>
- Date: Tue, 6 Sep 2005 11:59:23 +0800
>
> > how can i determine the number of parameters this function
> > needs?
>
> The simple answer is: it doesn't need any :) since Lua will just fill
> in the missing ones with nil.
this one i know. but that doesn't really answer my need.
>
> 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.
this one i don't need.
>
> 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
> signature.
>
this is the answer i need. will investigate it further.
just had to make sure that there isn't any existing easy way
to do introspection in lua.
thank you :-)
--
salud,
eyan
http://www.eyan.org