Re: [fpc-pascal] Operator not overloaded

2022-06-24 Thread Sven Barth via fpc-pascal
Thomas Kurz via fpc-pascal schrieb am Fr., 24. Juni 2022, 15:33: > Thank you very much, declaring the operator within the record does indeed > solve the issue. > > Just to be sure in case I might need it some day: Does this mean, if I > need e.g. a comparison operator for a specialized TPair, I w

Re: [fpc-pascal] Operator not overloaded

2022-06-24 Thread Thomas Kurz via fpc-pascal
? - Original Message - From: Sven Barth via fpc-pascal To: FPC-Pascal users discussions Sent: Friday, June 24, 2022, 10:43:55 Subject: [fpc-pascal] Operator not overloaded Thomas Kurz via fpc-pascal schrieb am Do., 23. Juni 2022, 19:45: > When compiling, I get this error: > pathfindi

Re: [fpc-pascal] Operator not overloaded

2022-06-24 Thread Sven Barth via fpc-pascal
Thomas Kurz via fpc-pascal schrieb am Do., 23. Juni 2022, 19:45: > When compiling, I get this error: > > pathfinding.pas(17,17) Error: Operator is not overloaded: "TTileSegment" = > "TTileSegment" > > Which I don't understand -- because the "=" operator is defined in > tesstypes.pas. > > Am I doi

[fpc-pascal] Operator not overloaded

2022-06-23 Thread Thomas Kurz via fpc-pascal
Hello, I have tried to create an example as minimalistic as possible. I have three files: *** file: pathfinding.pas *** unit PathFinding; {$mode objfpc} interface type generic TAStar = class (TObject) public function FindPath (const AStart: T; const ADestination: T): Boolean; virtual; end