Sign in Join
FPDoc Onlineexperiment

TFPSMap.Add function

Member of TFPSMappublicIn unit fgl

Add a key, value pair to the map.

Declaration

pascal
function Add(AKey: Pointer; AData: Pointer): Integer
function Add(AKey: Pointer): Integer

Arguments

AKey

Pointer to key to add to list.

AData

Pointer to data to add to list.

Function result

Slot in the list for the key and data.

Description

Add adds the memory pointed to by AData to the map using the memory pointed to by AKey as the key. If no data is specified, it allocates a slot for AKey and returns a pointer to that slot.

Errors

If the maximum amount of values is reached, Add will raise an EListError exception.

See also

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