SetAddMember Function


Adds a member to a set.


NewSet = SetAddMember (Set, NewMember)
Variable Description
NewSet Set to which a new member is added. SET.
Set Set which is to receive a new member. SET.
NewMember Member to be added to a set—one of the values specified in the set declaration for that SET data type. SET.


All members of a set must be unique; therefore, if SetAddMember determines that the specified new member already exists in the set, the NewSet returned is the same as Set.

You can also use the plus (+) operator for this operation. The following statement is the equivalent of the SetAddMember statement in the example below:

COLORS MyColors = HotColors + Purple


[-] type COLORS is set
	[ ] Red 
	[ ] Blue
	[ ] Yellow
	[ ] Green
	[ ] Purple
	[ ] Orange
[ ] COLORS HotColors = {Red, Yellow, Orange}
[ ] COLORS MyColors = SetAddMember (HotColors, Purple)