[fpc-devel] C style operator doesn't work with properties in 2.3.1

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Jul 16 16:50:26 CEST 2008


On Wed, Jul 16, 2008 at 4:29 PM, Marco van de Voort <marcov at stack.nl> wrote:
>> After our discussion about not being able to use Include() with a
>> class property, I thought I would then use the C Style += operator.
>> After all that boils down to:  i += 2;    >>>>>   i := i + 2;
>
> Suspect that it gets translated to inc(i,2); not i:=i+2; and then it makes
> sense again, for the same reasons as before.


Boy of boy.... FPC 2.3.1 is becoming frustrating!!

So is there a performance difference between:
   inc(i,2)    vs    i := i + 2;


If not, then can the += operator rather use the latter?  After all,
just about every peace of documentation on += operator I could find,
they mention that it's an shorthand form of x := x + y



Regards,
 - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-devel mailing list