Sign in Join
FPDoc Onlineexperiment

TObjectArray.IndexOf function

Member of TObjectArraypublicIn unit ObjectLists

Gets the ordinal position in List where the specified TItem instance is stored.

Declaration

pascal
function IndexOf(Item: TItem): Integer

Arguments

Item

TItem instance to locate in the List of associations.

Function result

Ordinal position for the requested TItem instance.

Description

IndexOf is an Integer function used to get the ordinal position in List where the TItem instance specified in Item is stored. IndexOf iterates over the storage in List in reverse order.

The return value contains the ordinal position where the T2Pointer.Item member and the Item argument contain the same class instance. The return value is -1 when Item is not located in the associations stored in List.

See also

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