Cicode Programming Reference > Cicode Function Categories > Cicode Object Functions | Cicode

Map Functions

Map functions allow for values to be associated with keys within the map.

As the handle to a map (or map name) is a string, it can be stored either as a key or as a value in another map, therefore maps can be used to create arbitrarily complex data structures.

By treating a map as being equivalent to an “instance” of an “object” in an “object-oriented” language, it is possible to achieve a simplified object oriented programming style. This can be done by passing the map name as a parameter to the “object’s” functions.

The keys in the map are case sensitive and are ordered alphabetically as can be observed by sequentially discovering each key in the map (using MapKeyFirst and MapKeyNext). The alphabetic ordering is not lexicographic ordering and only determines a repeatable order for a given set of keys.

Following are Map functions:

MapOpen

Create a new or open an existing map.

MapClear Clear all entries in a map.

MapClose

Deletes a previously created map.

MapExists

Check if the map exists using a returned error code.

MapKeyCount

Retrieves the number of keys in a map.

MapKeyDelete

Delete a key and its value from a map.

MapKeyExists

Check if a key exists in a map.

MapKeyFirst

Retrieves the first key in a maps so that all the keys in a map can be discovered.

MapKeyNext

Retrieves the next key after the supplied key in a map so that all the keys in a map can be discovered.

MapValueGet

Retrieves the value from a key in a map.

MapValueSet

Sets the value of a key in a map.

MapValueSetQuality

Sets the quality of a value in a map.

See Also

Published June 2018