[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: how to get varname as in varname = functionname()
- From: "Ashwin Hirschi" <deery@...>
- Date: Sat, 29 May 2004 23:43:23 +0200
Having a lua script line like:
Varname = functionname()
And functionname() is a registered c function, how can i read out the
varname from the c funtion.
I'm not quite sure about the example you give... But, functions do not have names. Like strings and numbers they can be assigned to any number of variables, though. For example, take this scenario:
function q(x) return x * x end
f = q
g = q
What would be the "name" of the function that was defined? The f, g and q variables all contain references to it... And these variables may change over time as well.
Perhaps the thing to ask is: why would you want the 'name' of a particular function?
Ashwin.
--
no signature is a signature