MapKeyExist

Determines whether or not a key is present in a WIL map.

Syntax:

MapKeyExist(map, key)

Parameters:

(m) map: a variable containing a WIL map.

(s) key: a string to test for existents as a key in the passed in WIL map.

Returns:

(m)  @True(1) if the key exist and @False(0) if it does not.

 

The MapKeyExist function is used to test whether or not a specified key exists in a WIL map.

Note: The case of the key string is ignored.

Example:
Pairs = 'Apples,0':@tab:'Oranges,0':@tab:'Pears,0'
Fruit = MapCreate(Pairs)
; Count a peach.
If MapKeyExist(Fruit, 'Peach')
   Fruit["peach"] += 1
Else
   Fruit["peach"] = 1
EndIf
See Also:

MapCreate, MapFileGetCsv, MapFilePutCsv, MapKeyRemove, MapKeysGet, MapKeyFind