lua-users home
lua-l archive

Re: digit strings as table indexes

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


Javier Guerra wrote:
On Thursday 25 January 2007 11:22 am, Jimmie Houchin wrote:
(...)
table["_"]					-- ok
table._					-- wrong!
also, since the dot notation is sugar for _string_ values, you have to watch out when the key isn't a string: table[true] -- key is the boolean true value table.true -- key is the string "true"
(...)
< table._ > is valid, but < table.true > isn't ( 'true' is a keyword )
--rb

AltStyle によって変換されたページ (->オリジナル) /