Sign in Join
FPDoc Onlineexperiment

TFPObjectList.IndexOf function

Member of TFPObjectListpublicIn unit Contnrs

Search for an object in the list.

Declaration

pascal
function IndexOf(AObject: TObject): Integer

Arguments

AObject

Object instance to search for.

Function result

Index of the object in the list, -1 if not present.

Description

IndexOf searches for the presence of AObject in the list, and returns the location (index) in the list. The index is 0-based, and -1 is returned if AObject was not found in the list.

Errors

None.

See also

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