[fpc-pascal] Re: Feature proposal: function-based assignment operators
Marc Weustink
marc at dommelstein.net
Tue Apr 2 11:11:41 CEST 2013
On 28-3-2013 17:52, Jonas Maebe wrote:
>
>
> += does *not* prevent re-evaluating the left side. It is internally
> translated to "x:=x+y" and then evaluated like normal. So if "x"
> contains a function call with side effects, these side effects are still
> triggered twice.
Is evaluated as x := x + y or as x := x + (y)
(where Y can be any expression)
I usually tanslate C code like the first, but recently found out that is
should be done like the last.
Marc
More information about the fpc-pascal
mailing list