请考虑为常用标志组合创建一个枚举常量。
Consider providing named constants for commonly used combinations of flags.
添加枚举常量red,并将其值设置为10。
类似地,添加枚举常量BLUE和GREEN,值分别为20 和30。
Similarly add enumeration literals BLUE and GREEN, with values 20 and 30, respectively.
枚举类型是一种有效取值仅限于一组常量的类型。
An enumerated type is one that has valid values limited to a set of constants. For instance, an enumeration may be defined for the colors of a stop light as follows.
枚举提供了一种替代的方法,不但定义了整数常量集,而且还把它们聚集成组。
Enumerations provide an alternative method of not only defining but also grouping sets of integral constants.
在IBMCognos8sdk上下文中,枚举集可以被视为一组只读常量。
In the context of the IBM Cognos 8 SDK, an enumeration set can be considered as a list of read-only constants.
例如,枚举成员的初始化式必须是常量表达式。
For example, the initializer of an enumerator must be a constant expression.
枚举类型(也称为枚举)为定义一组可以赋给变量的命名整数常量提供了一种有效的方法。
An enumeration type (also named an enumeration or an enum) provides an efficient way to define a set of named integral constants that may be assigned to a variable.
枚举类型(也称为枚举)为定义一组可以赋给变量的命名整数常量提供了一种有效的方法。
An enumeration type (also named an enumeration or an enum) provides an efficient way to define a set of named integral constants that may be assigned to a variable.
应用推荐