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

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Mar 28 17:52:00 CET 2013


On 28 Mar 2013, at 17:50, Benito van der Zander wrote:

>> What's the benefit?
> Same benefit as += to := ... +
> 
> You do not need to rewrite/compute the left side

+= 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.


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


More information about the fpc-pascal mailing list