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

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to