Cold Help System: Programming: ColdC Reference Manual: Functions: Dictionary: dict_add()


DICTIONARY dict_add(DICTIONARY dict, ANY key, ANY value)

This function adds an association to the dictionary dict. The key and value of the association are given as the key and value arguments. The new dictionary is returned. If key already exists in dict, then the value of the existing key is replaced with value. Examples:

dict_add(#[["foo", "bar"]], 3, 'quux)
=> #[["foo", "bar"], [3, 'quux]]
dict_add(#[["foo", 1], ["bar", 2], ["baz", 3]], "bar", 4)
=> #[["foo", 1], ["bar", 4], ["baz", 3]]


dict_add() | dict_contains() | dict_del() | dict_keys() | dict_union() | dict_values()


the Cold Dark