[fpc-pascal] Delphi-FPC difference in handling TList

Michael Van Canneyt michael at freepascal.org
Tue Oct 20 09:22:31 CEST 2015



On Tue, 20 Oct 2015, Bo Berglund wrote:

> I am porting a Delphi class to FPC and I ran into a problem concerning
> TList:
>
> FCommands.Sort(CommandCompare);
>
> This generates an error:
> Error: Wrong number of parameters specified for call to
> "CommandCompare"
>
> This call works just fine in Delphi and I have no clue as to why it
> happens in FPC.

If you are compiling in objfpc mode, try

  FCommands.Sort(@CommandCompare);

Michael.



More information about the fpc-pascal mailing list