Sign in Join
FPDoc Onlineexperiment

TObjectList.IndexOf function

Member of TObjectListpublicIn unit Contnrs

Search for an object in the list.

Declaration

pascal
function IndexOf(AObject: TObject): Integer

Arguments

AObject

Object to search for.

Function result

Position (index) at which object was found.

Description

IndexOf overrides the TList implementation to accept an object instance instead of a pointer.

The function returns the index of the first match for AObject in the list, or -1 if no match was found.

Errors

None.

See also

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