Documentation for operator overloading does not mention that global operator overloading is not possible in Delphi mode

Original Reporter info from Mantis: Bart @flyingsheep
  • Reporter name: Bart Broersma

Description:

The official documentation of FreePascal (ftp://ftp.freepascal.org/pub/fpc/docs-pdf/ref.pdf) does not mention that you cannot use global operator overloading im mode Delphi.

Related forum thread: https://forum.lazarus.freepascal.org/index.php/topic,52117.0.html

Additional information:

B.t.w.: It also does not mention that you cannot use syntax like "operator + (R,L: TSomeType): TSomeType", but you have to use symbolic types ("add" in this case). At least according to Ebarcadero: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Operator_Overloading_(Delphi)

Mantis conversion info:

  • Mantis ID: 38072
  • OS: Windows
  • OS Build: 10
  • Platform: i386