不可以!集合的元素有归定!! 不能那样定义你可以这样 Type TField1 = (Ax20, Bx20); <----这样凑齐20个!它的值不能是字符串!或数字! Field1 = Set Of TField1;
因为集合类型一定要求其中的元素是有序(ordinal)的,所以不能声明无序的集合 Ordinal types include integer, character, Boolean, enumerated, and subrange types. An ordinal type defines an ordered set of values in which each value except the first has a unique predecessor and each value except the last has a unique successor. Further, each value has an ordinality, which determines the ordering of the type. For integer types, the ordinality of a value is the value itself; for all other ordinal types except subranges, the first value has ordinality 0, the next value has ordinality 1, and so forth. If a value has ordinality n, its predecessor has ordinality n ?1 and its successor has ordinality n + 1.Several predefined functions operate on ordinal values and type identifiers. The most important of them are summarized below.Function Parameter Return value Res Ord ordinal expression ordinality of expression抯 value Does not take Int64 arguments. Pred ordinal expression predecessor of expression抯 value Do not use on properties that have a write procedure. Succ ordinal expression successor of expression抯 value Do not use on properties that have a write procedure. High ordinal type identifier or variable of ordinal type highest value in type Also operates on short-string types and arrays. Low ordinal type identifier or variable of ordinal type lowest value in type Also operates on short-string types and arrays. For example, High(Byte) returns 255 because the highest value of type Byte is 255, and Succ(2) returns 3 because 3 is the successor of 2. The standard procedures Inc and Dec increment and decrement the value of an ordinal variable. For example, Inc(I) is equivalent to I := Succ(I) and, if I is an integer variable, to I := I + 1.
不可以!集合的元素有归定!!
不能那样定义你可以这样
Type
TField1 = (Ax20, Bx20); <----这样凑齐20个!它的值不能是字符串!或数字!
Field1 = Set Of TField1;
Ordinal types include integer, character, Boolean, enumerated, and subrange types. An ordinal type defines an ordered set of values in which each value except the first has a unique predecessor and each value except the last has a unique successor. Further, each value has an ordinality, which determines the ordering of the type. For integer types, the ordinality of a value is the value itself; for all other ordinal types except subranges, the first value has ordinality 0, the next value has ordinality 1, and so forth. If a value has ordinality n, its predecessor has ordinality n ?1 and its successor has ordinality n + 1.Several predefined functions operate on ordinal values and type identifiers. The most important of them are summarized below.Function Parameter Return value Res
Ord ordinal expression ordinality of expression抯 value Does not take Int64 arguments.
Pred ordinal expression predecessor of expression抯 value Do not use on properties that have a write procedure.
Succ ordinal expression successor of expression抯 value Do not use on properties that have a write procedure.
High ordinal type identifier or variable of ordinal type highest value in type Also operates on short-string types and arrays.
Low ordinal type identifier or variable of ordinal type lowest value in type Also operates on short-string types and arrays.
For example, High(Byte) returns 255 because the highest value of type Byte is 255, and Succ(2) returns 3 because 3 is the successor of 2.
The standard procedures Inc and Dec increment and decrement the value of an ordinal variable. For example, Inc(I) is equivalent to I := Succ(I) and, if I is an integer variable, to I := I + 1.