View Issue Details

IDProjectCategoryView StatusLast Update
0038071FPCDocumentationpublic2020-11-16 16:44
ReporterOkobaPatino Assigned ToMichael Van Canneyt  
Status closedResolutionfixed 
Fixed in Version3.3.1 
Summary0038071: State that declaration global operators in Delphi mode is not possible
DescriptionIt is not clear from this document that it is impossible to declare a global operator for a type.
It should be something like this that these operators are not recognized in Delphi mode:

To be clear, this code is not possible in Delphi mode but possible in objfpc mode:
program Project1;
{$MODE Delphi}
  complex = record
    re: Real;
    im: Real;
  operator assign (r: Real) z: complex;
  begin := r; := 0.0;
  R: Real;
  C: complex;
  C := R;
Additional Information,52117.0.html
TagsNo tags attached.
Fixed in Revision1774.
Attached Files


has duplicate 0038072 closedMichael Van Canneyt Documentation for operator overloading does not mention that global operator overloading is not possible in Delphi mode 


Bart Broersma

2020-11-12 17:09

reporter   ~0126864

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:

Kai Burghardt

2020-11-13 02:03

reporter   ~0126869

Bart, it _does_ say below the table 15.1 “Operator Names”, quote:

*Remark* When compiling in `Delphi` mode the names of the operators _must_ be used, not the symbols.

Bart Broersma

2020-11-13 12:44

reporter   ~0126875

Last edited: 2020-11-13 12:50

View 2 revisions

The official docs are at
This document does NOT have a table in section 15.1 and the phrase "the names of the operators" does not appear in the entire document.

@Kai: I see now that you refer to

Kai Burghardt

2020-11-13 13:05

reporter   ~0126876

Are they?

As far as I understand Michael, the “official” official documentation is the repository. Supplying a PDF version is just a complimentary service, so are the HTML pages. If the tools used for that (pdflatex, text2ht) do not generate appropriate documents, it is “not our department”. After all, the source code `ref.tex` _does_ contain the proper statements.

Bart Broersma

2020-11-13 14:41

reporter   ~0126878

> Are they?

Maybe, or maybe not.
I would expect the pdf to be the same as the html files, since points to the pdf in question.
I used the pdf, because you can search the whole document for phrases.

But this becomes a bit off-topic for the mattaer at hand.

Michael Van Canneyt

2020-11-13 15:50

administrator   ~0126882

Reworked the documentation on operator overloading.
- Global operators are not at all supported in mode Delphi.
- Global operators only work with symbols (+/-=* etc).
- In record class operator definitions, objfpc mode requires symbols, delphi mode allows both symbols and names.

Michael Van Canneyt

2020-11-13 15:53

administrator   ~0126884

Unfortunately, the PDF documentation files on the FTP site had not been updated :-(
(you could have spotted this in the version number, they dated from 2017)
But I did this now. Good that this discussion arose, or I would never have noticed.

Thanks !


2020-11-14 06:47

reporter   ~0126908

Thanks @michael.
When does the live document (that I linked to) will be updated?

Michael Van Canneyt

2020-11-14 10:19

administrator   ~0126911

When 3.2.2 is released, this should hopefully still be this year.


2020-11-14 10:39

reporter   ~0126913

Where can I check the last version documentation before reporting such a bug in the future? As maybe this one was fixed already, and the live version that I reported was old.
I checked the commit list of this ( mirror, but I couldn't find the change.

Michael Van Canneyt

2020-11-14 10:49

administrator   ~0126915

In subversion:
svn co

Or on the web:


2020-11-14 12:21

reporter   ~0126921

So there is no way to see them as the web document (with pages like the live version) to find the values quickly.
Something like to move between versions will be useful.
But I found your changes, and they are much more apparent. Thank you.


2020-11-16 16:44

reporter   ~0126985

Checked and it is now clear.
Thank you.

Issue History

Date Modified Username Field Change
2020-11-12 15:40 OkobaPatino New Issue
2020-11-12 15:40 OkobaPatino Status new => assigned
2020-11-12 15:40 OkobaPatino Assigned To => Michael Van Canneyt
2020-11-12 17:07 Michael Van Canneyt Relationship added has duplicate 0038072
2020-11-12 17:09 Bart Broersma Note Added: 0126864
2020-11-13 02:03 Kai Burghardt Note Added: 0126869
2020-11-13 12:44 Bart Broersma Note Added: 0126875
2020-11-13 12:50 Bart Broersma Note Edited: 0126875 View Revisions
2020-11-13 13:05 Kai Burghardt Note Added: 0126876
2020-11-13 14:41 Bart Broersma Note Added: 0126878
2020-11-13 15:50 Michael Van Canneyt Status assigned => resolved
2020-11-13 15:50 Michael Van Canneyt Resolution open => fixed
2020-11-13 15:50 Michael Van Canneyt Fixed in Version => 3.3.1
2020-11-13 15:50 Michael Van Canneyt Fixed in Revision => 1774.
2020-11-13 15:50 Michael Van Canneyt FPCTarget => 3.2.2
2020-11-13 15:50 Michael Van Canneyt Note Added: 0126882
2020-11-13 15:53 Michael Van Canneyt Note Added: 0126884
2020-11-14 06:47 OkobaPatino Note Added: 0126908
2020-11-14 10:19 Michael Van Canneyt Note Added: 0126911
2020-11-14 10:39 OkobaPatino Note Added: 0126913
2020-11-14 10:49 Michael Van Canneyt Note Added: 0126915
2020-11-14 12:21 OkobaPatino Note Added: 0126921
2020-11-16 16:44 OkobaPatino Status resolved => closed
2020-11-16 16:44 OkobaPatino Note Added: 0126985