lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 21/09/2008, at 3:50 PM, Mark Meijer wrote:

AFAIK, any keys present in a table constructor have to be immediate
values. At any other place, you can use any expression you like to
access tables (aside from some exceptions, such as nil, or keywords or
symbols as names when using the dot notation).

I don't understand the original question either, but is it relevant that this:

a, b = "hello", "world"
t = { [a]=b }
=t["hello"]

is legal and prints "world"?

Cheers,
Geoff