Sign in Join
FPDoc Onlineexperiment

TFPSList.IndexOf function

Member of TFPSListpublicIn unit fgl

Search an item in the list.

Declaration

pascal
function IndexOf(Item: Pointer): Integer

Arguments

Item

Pointer to item to search for.

Function result

Position in the list (0-based).

Description

IndexOf searches in the list for the item pointed to by Item, and returns the position (0-based index) of the item in the list, or -1 if it was not found. The items are compared using CompareMem, so an exact memory layout match.

See also

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