deleteMapValue()

Synopsis

Deletes an entry identified by key in tableID. Returns False if there is no map for the given tableID, or if key is not found. Returns True if the entry is found and removed.

A "map" data structure is sometimes referred to as a "hash table" or "lookup table" and is created with defineMap().

Syntax

deleteMapValue ( tableID As Name, _
                 key As Name ) As Boolean 
Argument Type Description
tableID Name The name of the Map. Must have been previously created with defineMap().
key Name The key for the entry to delete.

Example 1

This example defines a map, sets a couple values, defines the map again without resetting it, gets map keys and some values, and finally deletes a map value.
Intent >defineMap(:myMap)
--> True
Intent >setMapValue(:myMap, :myStringValue, "A String")
--> True
Intent >setMapValue(:myMap, :myIntegerValue, 123)
--> True
Intent >defineMap(:myMap, reset? := False)
--> True
Intent >getMapKeys(:myMap)
--> {:myStringValue, :myIntegerValue}
Intent >getMapValue(:myMap, :myStringValue)
--> "A String"
Intent >getMapValue(:noMap, :noValue)
--> NoValue
Intent >deleteMapValue(:myMap, :myIntegerValue)
--> True
Intent >getMapValue(:myMap, :myIntegerValue)
--> NoValue