Set Constructors

A set constructor denotes a set-type value. For example,

denotes the set whose members are 5, 6, 7, and 8. The set constructor [ 5..8 ]

could also denote the same set. The syntax for a set constructor is [item1,..., itemn]

where each item is either an expression denoting an ordinal of the set's base type or a pair of such expressions with two dots (..) in between. When an item has the form x..y, it is shorthand for all the ordinals in the range from x to y, including y; but if x is greater than y, then x..y, the set [x..y], denotes nothing and is the empty set. The set constructor [ ] denotes the empty set, while [x] denotes the set whose only member is the value of x.

Examples of set constructors:

  • red, green, MyColor]
  • 1, 5, 10..K mod 12, 23]
  • A'..'Z', 'a'..'z', Chr(Digit + 48)]

For more information about sets, see Sets.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook

Post a comment