Martok <list...@martoks-place.de> schrieb am Mo., 12. Aug. 2019, 10:18:

> Am 12.08.2019 um 09:40 schrieb Michael Van Canneyt:
> >
> > This question pops up from time to time since 15 years if not more.
>
> Fun fact: questions asking why this doesn't work have a higher Google
> ranking
> than the manual for "COPERATORS" ;-)
>
> @Ryan: as with all things FPC, ignore the manual, read the parser:
> <
> https://github.com/graemeg/freepascal/blob/4e6c609/compiler/pexpr.pas#L221
> >
>
> Turns out c-operators do not actually translate to their long form but
> instead
> have special, duplicated handling. Because of course they do.
>

The code you linked converts "a += b" to "tmp := @a; tmp^ := tmp^ + b", so
except for using a temp to avoid duplicate calculation of "a" in how far is
this not the long form?

Regards,
Sven

>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to