[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Variable names
- From: "Steve Donovan" <sjdonova@...>
- Date: Wed, 04 Aug 2004 15:04:22 +0200
>>> andreas@airsoftsoftwair.de 08/04/04 02:46PM >>>
I can get the values of the variables using luaL_checknumber()
but is it also possible to get the names of the variables that
were passed? i.e. the strings "a", "b" and "c"
All parameters are passed by value, so you have
no way of finding out the variable names. You could
define your function to receive a table parameter:
func { a = 1, b = 2, c = 3 }
and in fact this is recommended in PIL as a way to have
parameters passed 'by name'.
I assume there's something special about those values,
that you want to know the name attached to them. If they
were tables you could easily attach a name to them
using another table.
steve d.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.