Skip to main content

TdxFastList.ExtractByIndex(Integer) Method

Returns a stored pointer by its index and removes it from the list.

Declaration

function ExtractByIndex(AIndex: Integer): Pointer;

Parameters

Name Type
AIndex Integer

Returns

Type
Pointer

Remarks

Call this function and pass an index within the ordered pointer list as the AIndex parameter to extract the corresponding pointer. The ExtractByIndex function:

  • Removes the specified pointer and returns it.

  • Decrements the Count property value by one.

  • Shifts any remaining pointers at the end of the original list by one position towards the list’s beginning.

The “List index out of bounds” exception occurs if the AIndex parameter value is:

  • Equal to or greater than the Count property value.

  • Negative.

Note

Call the Delete procedure instead if you do not need to obtain a removed pointer.

See Also