联合体
在计算机科学中,联合体(英语:union)又名共用体,是一种具有多个类型或格式的值,或者把它定义为一种由具有这样的值的变量形成的数据结构。一些编程语言可以支持被称为“联合体”的特殊的数据类型,来表示上述的变量。换句话说,一个联合体的定义(defenition)会指定一些允许的可以存储在实例内的原始数据类型(例如整型,浮点)。和记录(record)(或结构,structure)那些可以被定义去包含一个浮点数或整型不同的是,在一个联合体任何时候只有一个值。
在C语言中,一个典型的例子如下:
网站首页 情感咨询 情感美文 情感百科 情感生活 学习充电 旧版美文
| 词汇 | Union type |
| 分类 | 英语词汇 英语翻译词典 |
| 释义 |
Union type
中文百科
联合体在计算机科学中,联合体(英语:union)又名共用体,是一种具有多个类型或格式的值,或者把它定义为一种由具有这样的值的变量形成的数据结构。一些编程语言可以支持被称为“联合体”的特殊的数据类型,来表示上述的变量。换句话说,一个联合体的定义(defenition)会指定一些允许的可以存储在实例内的原始数据类型(例如整型,浮点)。和记录(record)(或结构,structure)那些可以被定义去包含一个浮点数或整型不同的是,在一个联合体任何时候只有一个值。 在C语言中,一个典型的例子如下:
英语百科
Union type 联合体In computer science, a union is a value that may have any of several representations or formats; or it is a data structure that consists of a variable that may hold such a value. Some programming languages support special data types, called union types, to describe such values and variables. In other words, a union type definition will specify which of a number of permitted primitive types may be stored in its instances, e.g., "float or long integer". Contrast with a record (or structure), which could be defined to contain a float and an integer; in a union, there is only one value at any given time. |
| 随便看 |
|
依恋情感网英汉例句词典收录3870147条英语例句词条,基本涵盖了全部常用英语单词的释义及例句,是英语学习的有利工具。