delphi 枚举类型
Delphi's programming language is an example of a strongly typed language. This means that all variables must be of some type. A type is essentially a name for a kind of data. When we declare a variable, we must specify its type, which determines the set of values the variable can hold and the operations that can be performed on it.
Delphi的编程语言是强类型语言的示例。 这意味着所有变量必须为某种类型。 类型本质上是一种数据的名称。 声明变量时,必须指定其类型,该类型确定该变量可以保存的一组值以及可以对该变量执行的操作。
Many of Delphi's built-in data types, such as Integer or String, can be refined or combined to create new data types. In this article, we'll see how to create custom ordinal data types in Delphi.
Delphi的许多内置数据类型(例如Integer或String )可以进行优化或组合以创建新的数据类型。 在本文中,我们将看到如何在Delphi中创建自定义序数数据类型。
序数类型 ( Ordinal Types )
The defining characteristics of ordinal data types are: they must consist of a finite number of elements and they must be ordered in some way.
序数数据类型的定义特征是:它们必须由有限数量的元素组成,并且必须以某种方式排序。
The most common examples of ordinal data types are all the Integer types as well as Char and