网站首页  英汉词典

请输入您要查询的英文单词:

 

单词 Enumerated type
释义

Enumerated type

中文百科

枚举

在数学和计算机科学理论中,一个集的枚举是列出某些有穷串行集的所有成员的进程,或者是一种特定类型对象的计数。这两种类型经常(但不总是)重叠。

如果枚举没有初始化,即省掉"=整型常数"时,则从第一个标识符开始,顺次赋给标识符0, 1, 2, ...。但当枚举中的某个成员赋值后,其后的成员按依次加1的规则确定其值。例如下列枚举说明后, x1, x2, x3, x4的值分别为0, 1, 2, 3。
enum string{x1, x2, x3, x4}x;

当定义改变为:

则x1=0, x2=0, x3=50, x4=51 注意:

英语百科

Enumerated type 枚举

In computer programming, an enumerated type (also called enumeration or enum, or factor in the R programming language, and a categorical variable in statistics) is a data type consisting of a set of named values called elements, members, enumeral, or enumerators of the type. The enumerator names are usually identifiers that behave as constants in the language. A variable that has been declared as having an enumerated type can be assigned any of the enumerators as a value. In other words, an enumerated type has values that are different from each other, and that can be compared and assigned, but which are not specified by the programmer as having any particular concrete representation in the computer's memory; compilers and interpreters can represent them arbitrarily.

随便看

 

英汉网英语在线翻译词典收录了3779314条英语词汇在线翻译词条,基本涵盖了全部常用英语词汇的中英文双语翻译及用法,是英语学习的有利工具。

 

Copyright © 2004-2024 encnc.com All Rights Reserved
更新时间:2025/6/21 18:13:41