IDLitCommand::AddItem

Syntax | Return Value | Arguments | Keywords | Version History

The IDLitCommand::AddItem function method adds the specified data item to the data dictionary associated with this object.

Note
If a data item with the specified identifying string is already in the data dictionary, the new value is not added unless the OVERWRITE keyword is set, in which case the old value is discarded.

Syntax

Result = Obj->[IDLitCommand::]AddItem(StrItem, Item[, /OVERWRITE])

Return Value

Returns 1 if the item was successfully added to the data dictionary, or 0 if the new value was not added.

Arguments

StrItem

A scalar string used to identify the data specified by the Item argument in the data dictionary. This string is treated in a case-insensitive manner.

Item

A data item of any IDL data type.

Keywords

OVERWRITE

Normally, if an item already exists in the data dictionary of an IDLitCommand object, it is not overwritten. If this keyword is set, the original value will be overwritten.

Note
If the item being replaced uses dynamic memory (that is, if it is a pointer or object reference), the memory must be released by calling PTR_FREE or OBJ_DESTROY before overwriting the value.

Version History

6.0

Introduced