[Overview][Constants][Types][Classes][Index] Reference for unit 'fgl' (#rtl)

TFPSMap.Find

Find data using the associated key

Declaration

Source position: fgl.pp line 260

public function TFPSMap.Find(

  AKey: Pointer;

  out Index: Integer

):Boolean;

Arguments

AKey

  

Key to search for

Index

  

Index of first key smaller than Akey

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

TFPSMap.OnKeyPtrCompare

  

Callback to compare 2 keys


Documentation generated on: Sep 28 2017