lua-users home
lua-l archive

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


Sure it does NOT. I was not soeaking about the semicolon that was used to separate a named key, i.e out of the integer sequence and thus not counted by select('#', ..')

Le dim. 12 sept. 2021 à 09:04, Tim Hill <drtimhill@gmail.com> a écrit :


On Sep 9, 2021, at 12:27 AM, Philippe Verdy <verdyp@gmail.com> wrote:


Sure it does .. Lua allows semi-colon as an alternate to comma in table constructors. From the 5.3 reference manual:

tableconstructor ::= ‘{’ [fieldlist] ‘}’
	fieldlist ::= field {fieldsep field} [fieldsep]
	field ::= ‘[’ exp ‘]’ ‘=’ exp | Name ‘=’ exp | exp
	fieldsep ::= ‘,’ | ‘;


Note that a ‘fieldsep’ is comma or semi-colon.

-Tim