lua-users home
lua-l archive

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


> when I try to define a table with index "end", something like below:
> 
>> a={}
>> a.end=2
> 
> I get the error message "stdin:1: '<name>' expected near 'end'", others
> index name (for example, a.end1=2, a.b=2 ) are ok.
> Looks like only "end" given error message.
> 
> Can you give me some ideas?

Because "end" is a keyword, you should use a['end'] = 2 instead.

 - Peter Odding