[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: classes and concat operator
- From: RLake@...
- Date: Wed, 26 Nov 2003 09:02:02 -0500
> 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.
HTH