Node: Set Types, Next: Pointer Types, Previous: Schema Types, Up: Type Definition Possibilities

##### Set Types

         set_type_identifier = set of set_element_type;

set_type_identifier is a set of elements from set_element_type which is either an ordinal type, an enumerated type or a subrange type. Set element representatives are joined together into a set by brackets:

         [set_element, ..., set_element]

`[]` indicates the empty set, which is compatible with all set types. Note: Borland Pascal restricts the maximal set size (i.e. the range of the set element type) to 256, GNU Pascal has no such restriction. The number of elements a set variable is holding can be determined by the intrinsic set function Card (which is a GNU Pascal extension, in Extended Pascal and Borland Pascal you can use SizeOf instead but note the element type size in bytes, then) to the set. There are four intrinsic binary set operations: the union `+`, the intersection `*` and the difference `-`. The symmetric difference `><` is an Extended Pascal extension.

#### See also

Card, SizeOf