[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: strange table index "end"
- From: Jeff Pohlmeyer <yetanothergeek@...>
- Date: Wed, 9 Mar 2011 08:27:16 -0600
On Wed, Mar 9, 2011 at 8:06 AM, Steve Litt wrote:
> This is the first surprising behavior I've ever seen in Lua.
> I would have expected it to know that mytable.end is a table
> element whose name happens to be "end".
Doesn't work in Lua:
rec={}
rec.do=1
'<name>' expected near 'do'
Doesn't work in C:
typedef struct rec {
int do;
};
error: expected identifier or '(' before 'do'
Doesn't work in Pascal:
type rec=record
do: integer;
end;
Fatal: Syntax error, "identifier" expected but "DO" found
- Jeff