TFPSMap.Find function
Find data using the associated key.
Declaration
function Find(AKey: Pointer; out Index: Integer): BooleanArguments
AKey | Key to search for. |
Index | Index of first key smaller than
|
Function result
True if an exact match was found.
Description
Find searches for the first key less than or equal to
AKey and
returns its index in the list in
Index. It returns
True if an exact match for the key was found.
It returns
False if the key was not found, and
Index is then set to
-1
This function performs a binary search using the key comparing function specified in OnKeyPtrCompare.
Errors
if
OnKeyPtrCompare is not set, an access violation will occur.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
