Sign in Join
FPDoc Onlineexperiment

TFPSList.Add function

Member of TFPSListpublicIn unit fgl

Add a new item to the list.

Declaration

pascal
function Add(Item: Pointer): Integer

Arguments

Item

Pointer to the item to be added.

Function result

The index at which the item was added.

Description

Add adds the item pointed to by Item to the list. It is not the pointer Item itself which is added to the list, but rather the ItemSize bytes of memory to which Item is pointing.

The function returns the index of the newly added item.

Errors

If the maximum list size is reached, an EListError is raised.

See also

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