网站首页  情感咨询  情感美文  情感百科  情感生活  学习充电  旧版美文

请输入您要查询的词汇:

 

词汇 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.

随便看

 

依恋情感网英汉例句词典收录3870147条英语例句词条,基本涵盖了全部常用英语单词的释义及例句,是英语学习的有利工具。

 

Copyright © 2004-2024 Yiyi18.com All Rights Reserved
京ICP备2021023879号 更新时间:2025/8/5 3:55:36