Sign in Join
FPDoc Onlineexperiment

TFPSMap.OnKeyPtrCompare property

Member of TFPSMappublicIn unit fgl

Callback to compare 2 keys.

Declaration

pascal
property OnKeyPtrCompare: TFPSListCompareFunc read FOnKeyPtrCompare write SetOnKeyPtrCompare;

Description

OnKeyPtrCompare is used to compare the values of 2 keys. By default it simply compares the byte values of the key memory block. It can be set to any function that performs another comparison. (e.g. a function that treats the memory blocks as a string pointer and compare the actual strings).

This function is used to sort the list or find a key.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.