Unexpected non-error in table

Report any Hollywood bugs here
Post Reply
p-OS
Posts: 167
Joined: Mon Nov 01, 2010 11:56 pm

Unexpected non-error in table

Post by p-OS »

Code: Select all

numeri={
 uno=1,
 due=2,
 tre=3,
}
After the last Item in the table there is a comma, without any item following.

I wonder, why this does not result in an error message ?
plouf
Posts: 467
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Unexpected non-error in table

Post by plouf »

because hollywood is designed with simplicity in mind instead of "c style hardcode" ?

i believe the opposite should be an error, which does (not add a comma)
but "reserving a seat" without using , why should be an error ?
Christos
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Unexpected non-error in table

Post by airsoftsoftwair »

That's indeed a feature and not a bug. Many programming languages behave like that, e.g. in C you can do the same and of course also in Lua.
Post Reply