SetComplement Function

Action

Returns the complement of a set.

Syntax

NewSet = SetComplement (Set)
Variable Description
NewSet The complement of a set. SET.
Set The set to be complemented. SET.

Notes

SetComplement compares the members of the specified set to all possible members for that set, as defined by the type...is set declaration, and returns all members which are not included in the specified set.

Example

[-] type COLORS is set
	[ ] Red
	[ ] Blue
	[ ] Yellow
	[ ] Green
	[ ] Purple
	[ ] Orange
	[ ] 
[-] COLORS HotColors = {...}
	[ ] Red
	[ ] Yellow 
	[ ] Orange
	[ ] 
[ ] COLORS CoolColors = SetComplement (HotColors)
[ ] 
[ ] //output of Print(CoolColors) is
[ ] 
[ ] //{Blue, Green, Purple}