question on docs

ppadilcdx--- via fpc-pascal <[email protected]>
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <[email protected]>
I’m a little confused by some references in the docs. Hopefully I can explain it clearly.

Looking at TFPGList in fgl. The Sort method refers to a TCompareFunc (it does not link to its definition). TFPGList says it’s methods are the same as TFPSList or classes.TFPList. So looking in these two other classes their Sort methods refer to TFPSListCompareFunc (in fgl) and TListSortCompare (in classes), respectively.

type TListSortCompare = function(
  Item1: Pointer;
  Item2: Pointer
):Integer;

type TFPSListCompareFunc = function(
  Key1: Pointer;
  Key2: Pointer
):Integer of object;

Two questions.
1) Should TCompareFunc in TFPGList.Sort be one of the above types, or is there another definition somewhere?
2) What is an “Integer of object” in TFPSListCompareFunc? (I expect it to be a typo but then I’m fairly new to free pascal so I might have missed the memo.)

Thanks,
Pete

_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.