PDA

View Full Version : how to concatenate a variable


gnetcanada
12-18-2004, 12:40 AM
is this possible?

say i have this variable, which is of course a reference to a table:
featurestable[count]

lets say this returns the table value "hello"

i want to access a variable
blah_hello

is this possible?

i cant do:
blah_..featurestable[count] or "blah_"..featurestable[count]
it treats it as a string,

please let me know!

Shawn

Corey
12-18-2004, 12:50 AM
Hi. I'm not sure I understand this one without an example but to concatenate a string to a variable you would go:

"string"..variable

String to string is:

"string".."string"

and variable to variable is:

variable..variable

A table reference is the same as a variable, i.e.:

table[name]..table[name]

or

"string"..table[name]

Etc. Hope that helps... :)