lua-users home
lua-l archive

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

> The following class overrides the concat operator,
> however using it, as one can use a string, produces 
> `=' expected near `..'

Reuben seems to have explained this. An expression is not a statement.

> Note I don't need the result of the concat, as
> eventually, the side effect of "chaining" will 
> produce the results required.

True, but if you returned the result, you could do multiple chaining.

a = a .. b .. c .. d

The concatenation operator is *right* associative, so the above is

a = a .. (b .. (c .. d))

which is probably what you want.