Add_Element - Set
Adds an element to the set if the element does not already exist
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| Elem_Str | String | Element value to be added to the set |
Syntax
Procedure Add_Element String Elem_Str
Call Example
Send Add_Element Elem_Str
Description
Add_Element adds an element to end of the set if the element does not yet exist. If the element value already exists, nothing happens.
object oSet is a set
send add_element 12 //add first (0th) element
send add_element 47.3 //add second (1st) element
send add_element "Igor" //add third (2nd) element
end_object
send add_element of oSet 12 // a duplicate, will not be added again
send add_element of oSet "new" // will be added to the set
See Also