Delete-Element
Command Description
Delete elements from a set
Command Prototype
Set.Remove(ObjSet,varValue)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
ObjSet | True | expression | ObjSet | The set object to operate on |
varValue | True | expression | varValue | The element to be removed from a set. Can be any type of data |
Demo
Dim ObjSet
ObjSet = Set.Create()
Set.Add(ObjSet,1)
Set.Add(ObjSet,2)
Set.Add(ObjSet,3)
// ObjSet = {1,2,3}
Set.Remove(ObjSet,2)
TracePrint(ObjSet)
/**
ObjSet = {1,3}
*/