On 01/13/2011 02:25 AM, Hans-Peter Diettrich wrote:
This would result in the same error, because x.a is not an lval.
The example that make me ask here was Form1.Caption := Form1.Caption + '.';
-Michael
___
fpc-devel maillist - fpc-devel@lists.free
Michael Schnell schrieb:
+= does work for variables, even Strings.
AFAIR, there already has been a discussion about += and friends for
properties.
In fact I don't see why the compiler not just generates "x.a := x.a + y"
from "x.a += y" before doing any code generating,
This would result in
In our previous episode, michael.vancann...@wisa.be said:
> > exactly what the user would expect ?
>
> Most of the time, yes. But there are some subtleties with interfaces and
> reference counting, which could bite you in the leg.
>
> (as they already have for some people).
Moreover, that IMHO t
On 01/12/2011 05:01 PM, michael.vancann...@wisa.be wrote:
reference counting, which could bite you in the leg.
(as they already have for some people).
I see. _Hidden_ side effects :)
-Michael
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
On Wed, 12 Jan 2011, Michael Schnell wrote:
On 01/12/2011 04:48 PM, Alexander Klenin wrote:
Blindly replacing "a += b" with "a := a + b" may lead to a semantic change
if "a" is an expression with side-effects.
Nevertheless, I do think that implementing += for properties is a good
idea,
but
On 01/12/2011 04:48 PM, Alexander Klenin wrote:
Blindly replacing "a += b" with "a := a + b" may lead to a semantic change
if "a" is an expression with side-effects.
Nevertheless, I do think that implementing += for properties is a good idea,
but unfortunately FPC developers disagree.
I do see th
On Wed, Jan 12, 2011 at 21:24, Michael Schnell wrote:
> += does work for variables, even Strings.
>
> AFAIR, there already has been a discussion about += and friends for
> properties.
>
> In fact I don't see why the compiler not just generates "x.a := x.a + y"
> from "x.a += y" before doing any co
+= does work for variables, even Strings.
AFAIR, there already has been a discussion about += and friends for
properties.
In fact I don't see why the compiler not just generates "x.a := x.a + y"
from "x.a += y" before doing any code generating, disregarding what x.a
is. Of course an error me