[fpc-pascal] Re: Feature proposal: function-based assignment operators

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Apr 2 11:54:03 CEST 2013


On 02 Apr 2013, at 11:11, Marc Weustink wrote:

> 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)

FPC guarantees nothing about the order in which expressions are  
evaluated. FPC generally reorders expressions based on how many  
registers the compiler thinks it will need.


Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130402/414b165b/attachment.html>


More information about the fpc-pascal mailing list