集合类型的一般形式为:
set of 基类型;
type
集合类型名称 = Set of 基类型;
基类型可以为:字符型、布尔型、枚举型和子界型。不能是整型、实型.
1集合中的元素是相异的。(不重复)
2集合中的元素是没有顺序的
3集合中的元素不能超过256个
定义集合类型
type
days=set of 28..31;
ch=set of 'A'..'Z';
weekday=(sun,tue,wed,thu,fri,sat);
workday=set of weekday;
集合类型的变量
var
ch1,ch2:ch;
wo1,wo2:workday;
d1,d2:days;