Lua use a variable in an object reference? -


is possible use variable in object reference in lua? example, a.value string, , a.value = "b". access a.b.c.d, or a.(a.value).c.d. how can accomplish this?

the syntax a.b shorthand a["b"]. want, you'd rid of "b" , instead use variable, this:

a[a.value].c.d 

Comments

Popular posts from this blog

Glib GIOChannel -

jsp - java.sql.SQLException: [Microsoft][ODBC Microsoft Access > Driver] Too few parameters. Expected 1 -

delphi - When I encode/decode SMS PDU (GSM 7 Bit) user data, do I need prepend the UDH first? -