[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: "nil" for an index
- From: Gavin Wraith <gavin@...>
- Date: Sun, 16 Jun 2002 15:28:17 +0100 (BST)
I was under the impression that the syntactic
sugar of t.x for t["x"] , and x = for ["x"] =
inside a table constructor, worked whenever x was
replaced by a string that was a valid
lua identifier. It appears to work, for example,
in both Lua 4.0 and 5.0(w0) if "x" is replaced by
"print". However, it appears not to work
if "x" is replaced by "nil". I do not see any
references to this in the manual (I have not looked
terribly hard). It would be nice to
have a definite characterization of those strings
for which the syntactic sugar is allowed.
--
Gavin Wraith (gavin@wraith.u-net.com)
Home page: http://www.wraith.u-net.com/