Pal, Peter's AutoIt Library Pal Wiki
Library for window, GUI, controls, string, math, data lists, dialogues
Brought to you by:
peverbeek
AutoIt file: Lists.au3
A key map (also known as dictionary) is a data list in which you store values which are retrieved by keys. In other words, a value is stored along with its key.
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
Function | Description |
---|---|
_MapCreate | Creates a key map for storing values attach to keys, can be use bidirectional |
_MapIsMap | Tests if given array is a key map |
_MapIsEmpty | Tests if key map is empty |
_MapClear | Clears a key map |
_MapAdd | Adds a key-value pair to the given key map |
_MapValueByKey | Gets a value of given key |
_MapKeyByValue | Gets a key of given value |
_MapRemoveByKey | Removes a key-value pair by key from the given key map |
_MapRemoveByValue | Removes a key-value pair by value from the given key map |
_MapGetKey | Gets a key of a given position, zero based |
_MapGetValue | Gets a value of a given position, zero based |
_MapKeyInMap | Tests if a key is in the key map |
_MapValueInMap | Tests if a value is in the key map |
_MapSize | Gets key map size |
_MapToArray | Creates an array from the given key map |
_ArrayToMap | Creates a key map from the given 2D array |