Skip to main content

TdxFastList.Insert(Integer,TdxFastList) Method

Inserts a pointer at the specified position within the ordered pointer list.

Declaration

procedure Insert(AIndex: Integer; AList: TdxFastList); overload;

Parameters

Name Type
AIndex Integer
AList TdxFastList

Remarks

Call this procedure and pass the insert position (index) and a pointer to insert as the AIndex and AItem parameters, respectively. The Insert procedure:

  • Increments the Count property value.

  • Shifts all pointers that follow the insert position in the original list by one position towards the list end.

  • Expands the list’s capacity if the number of stored pointers has reached the maximum list size prior to the procedure call.

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

The second overloaded Insert procedure variant is deprecated. Call the InsertRange procedure instead.

See Also