HomeManualTopicsTypesSymbols

std_types::association_list

retrieve, insert or delete an item

Parameters

myself^
key
specifies the item to retrieve, insert or delete
value (default: NONE)
the new item value (for insert)

Results

None

Description

Use

!items(key) value

to insert a new entry into items. If there is already an item with the same key then the existing item is replaced.

Remark: The above statement is transformed by the compiler as follows:

items !items key value

Use

items(key)

to retrieve a specific item from items. If there is no such item then std::undefined is returned.

Use

!items(key) undefined

to remove a specific item from items. It is valid to attempt to remove a non-existant item.

Remark: The above statement is transformed by the compiler as follows:

items !items key undefined