lua-users home
lua-l archive

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



On Mar 10, 2005, at 19:29, Ben Sunshine-Hill wrote:

{ "foo" = "bar" } isn't a valid statement; keyed fields in a table
constructor have to have either no quotes (in which case the lhs is
interpreted as a string key) or have to be enclosed in square brackets
(in which case the expression within the brackets is evaluated and
used as the key). See section 2.5.6 of the manual.

Ooops... my bad... so... { foo = "bar" } is correct, right?

But I need square brackets if I want something like "foo bar" = "baz", for example { [ "foo bar" ] = "baz" }, correct?

Thanks for the clarification :)

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/