PDA

View Full Version : Variable variable names - Answered



honnt
January 27th, 2006, 08:27 AM
Can't work this out...

Let's say I retrieve a string value from the registry, and assign the value to the variable 'MyVariable'.

MyVariable = pseudoGetFromRegfunction(registryentrylocation)

Now, let's say I want to create a variable named whatever the value of MyVariable is, pull another value from the registry, and set the value of the value of MyVariable to it....

Does this make sense? What am I missing?

Kerryp24
January 27th, 2006, 08:35 AM
Please don't take this the wrong way, but...

RTT
http://www.promixis.com/phpBB2/viewtopic.php?t=13002

Or

buy the Programming in Lua book.

Or

Both.

I did.
Really, get the book, it's worth it.
You will be amazed at all the questions (asked and un dreamed of) that it will answer.
:wink:

honnt
January 27th, 2006, 08:41 AM
'nuff said. Thanks.

birty
January 27th, 2006, 08:49 AM
if you are using a table then you can simply use

TableName[MyVariable]

honnt
January 27th, 2006, 08:55 AM
Kerryp24's reproof and exhortation led me to the truth ;-)

Thanks Kerry.