Adds a key-value pair to the given key map
Lists.au3 _MapAdd( $aMap, $vKey [, $vValue = 0 ] ) |
$aMap | Key map array as handle |
$vKey | Key to identify value |
$vValue | Value to add |
boolean value | True = Key-value pair added, False = Not a key map |
_MapValueByKey, _MapKeyByValue, _MapRemoveByKey, _MapRemoveByValue, _MapGetKey, _MapGetValue, _MapKeyInMap, _MapValueInMap
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