[Overview][Constants][Types][Classes][Index] |
Insert a new item in the list.
Source position: fgl.pp line 79
public procedure TFPSList.Insert( |
Index: Integer; |
Item: Pointer |
); |
Index: Integer |
):Pointer; |
Index |
|
Index at which to insert the new item in the list |
Item |
|
Item to insert in the list |
Index |
|
Index at which to insert the new item in the list |
Newly allocated slot in the list
Insert comes in 2 overloaded version. The version without Item creates a slot for a new item at position Index in the list, and returns a pointer to the new slot. The slot will be of size TFPSList.ItemSize.
The version with Item argument will allocate a slot in the list at position Index and will copy the item pointed to by Item to the slot in the list.
In both cases, Index must be 0-based.
If Index is invalid, an EListError exception will be raised.
|
Add a new item to the list |
|
|
Delete an item from the list |
|
|
delete an element from the list |