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

2013-04-02 Thread Jonas Maebe
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 stil

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

2013-04-02 Thread Marc Weustink
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 a

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

2013-03-28 Thread Jonas Maebe
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 "

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

2013-03-28 Thread Benito van der Zander
What's the benefit? Same benefit as += to := ... + You do not need to rewrite/compute the left side How will it affect existing code? Not at all, since old code using this, would not compile Last but not least, will you implement it? I can try On 03/28/2013 04:20 PM, leledumbo wrote: Hmm..