Skip to main content

Get-the-Union-Set

Command Description

Get the union of the sets and return the union as a new set

Command Prototype

objSetRet = Set.Union(ObjSet,ObjSet1)

Parameter Description

ParameterRequiredTypeDefaultDescription
ObjSetTrueexpressionObjSetThe set object to operate on
ObjSet1TrueexpressionObjSet1The sets to compare for intersections

return

objSetRet,The variable used to save the output of the command.

Demo

Dim ObjSet 
Dim ObjSet1
Dim objSetRet
ObjSet = Set.Create()
Set.Add(ObjSet,1)
Set.Add(ObjSet,3)
// ObjSet = {1,3}

ObjSet1 = Set.Create()
Set.Add(ObjSet1,2)
Set.Add(ObjSet1,4)
// ObjSet1 = {2,4}

objSetRet = Set.Union(ObjSet,ObjSet1)
TracePrint(objSetRet)
/**
objSetRet = {1, 2, 3, 4}
*/