_MapAdd

Adds a key-value pair to the given key map

Lists.au3
_MapAdd( $aMap, $vKey [, $vValue = 0 ] )

parameters

$aMap Key map array as handle
$vKey Key to identify value
$vValue Value to add

return value

boolean value True = Key-value pair added, False = Not a key map

related

_MapValueByKey, _MapKeyByValue, _MapRemoveByKey, _MapRemoveByValue, _MapGetKey, _MapGetValue, _MapKeyInMap, _MapValueInMap

example

Local $aAddress = _MapCreate()
_MapAdd( $aAddress, "street", "Scary avenue" )
_MapAdd( $aAddress, "town", "Ghost town" )
_MapAdd( $aAddress, "state", "Night state" )
....
If _MapKeyInMap( $aAddress, "street" ) > -1 Then _ConsoleWrite( _MapValueByKey( $aAddress, "street" ) ) ; Scary avenue