About: Union type     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : yago:WikicatDataStructures, within Data Space : dbpedia.org associated with source document(s)
QRcode icon
http://dbpedia.org/describe/?url=http%3A%2F%2Fdbpedia.org%2Fresource%2FUnion_type

In computer science, a union is a value that may have any of several representations or formats within the same position in memory; that consists of a variable that may hold such a data structure. 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". In contrast with a record (or structure), which could be defined to contain both a float and an integer; in a union, there is only one value at any given time.

AttributesValues
rdf:type
rdfs:label
  • Unión de datos (es)
  • 공용체 (컴퓨터 과학) (ko)
  • 共用体 (ja)
  • Unia (programowanie) (pl)
  • Union type (en)
  • Объединение (структура данных) (ru)
  • 联合体 (zh)
rdfs:comment
  • Unia – typ danych w niektórych językach programowania, jak C, PHP (od wersji 8) lub asembler, grupujący wiele różnych sposobów interpretacji tego samego fragmentu pamięci. Odpowiednikiem unii w języku Pascal jest rekord z wariantami. (pl)
  • 在计算机科学中,联合体(英語:union)又名共用體,是一种具有多个类型或格式的值,或者把它定义为一种由具有这样的值的形成的数据结构。一些编程语言可以支持被称为“联合体”的特殊的資料類型,来表示上述的变量。与枚举和结构体不同的是,一个联合体的长度等于其内部长度最大的成员的长度,并且它们都共享着同一段内存。 在C語言中,一個典型的例子如下: union name1{ int a; float b; char c;} uvar; (zh)
  • En programación, una unión es un valor que puede poseer varias representaciones o formatos; o una Estructura de datos que consiste en una variable que puede almacenar dicho valor. Algunos lenguajes de programación admiten tipos de datos especiales, llamados union types, para describir dichos valores y variables. A causa de sus limitaciones de uso, las uniones son normalmente proveídas en lenguajes sin tipado o en modo inseguro (como en C). Tienen la ventaja sobre las uniones etiquetadas por no necesitar espacio para guardar el tag. (es)
  • In computer science, a union is a value that may have any of several representations or formats within the same position in memory; that consists of a variable that may hold such a data structure. 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". In contrast with a record (or structure), which could be defined to contain both a float and an integer; in a union, there is only one value at any given time. (en)
  • 共用体(きょうようたい、英: union)は、プログラミング言語におけるデータ型の一つで、同じメモリ領域を複数の型が共有する構造である。 例として、ある入力が数字の場合は数値として、そうでない場合は文字列のまま保持したいという場合を考える。この場合、数値用と文字列用の領域をそれぞれ用意するのが一つの解法だが、入力は数値か文字列のどちらか一方なので、片方しか使われず無駄が出る。そこで代わりに、格納用の領域を一つだけ用意して、これを数値である、文字列であると場合により解釈し分けることで領域の無駄が抑えられる。この「格納用の領域」こそが共用体である。 共用体から意味のある値を取り出すためには、中身のデータそのものに加えて「今、何の型のデータが入っているか」という情報(タグという)が必要となる。タグを付加情報として持ち、常に正しい型でデータを得られるように設計された共用体を特にあるいはという。 (ja)
  • В информатике объединение (англ. union) представляет собой значение или структуру данных, которое может иметь несколько различных представлений. В сильно типизированных языках тип объединение соответствует понятию тип-сумма из теории типов, то есть требует использовать разные конструкторы для значений разных типов. В слабо типизированных языках, таких как C и C++, тип объединение реализует каламбур типизации, то есть обеспечивает интерпретацию одного и того же значения в соответствии с разными типами. (ru)
differentFrom
dcterms:subject
Wikipage page ID
Wikipage revision ID
Link from a Wikipage to another Wikipage
Link from a Wikipage to an external page
sameAs
dbp:wikiPageUsesTemplate
Link from a Wikipa... related subject.
has abstract
  • En programación, una unión es un valor que puede poseer varias representaciones o formatos; o una Estructura de datos que consiste en una variable que puede almacenar dicho valor. Algunos lenguajes de programación admiten tipos de datos especiales, llamados union types, para describir dichos valores y variables. Dependiendo del lenguaje y del tipo, un valor unión puede ser usado en operaciones como, por ejemplo, asignación o comparación de igualdad, sin necesidad de saber su tipo específico. Por el contrario, otras operaciones si que requieren saber el tipo de dato — ya sea por medio de información externa, o por el uso de un . A causa de sus limitaciones de uso, las uniones son normalmente proveídas en lenguajes sin tipado o en modo inseguro (como en C). Tienen la ventaja sobre las uniones etiquetadas por no necesitar espacio para guardar el tag. El nombre "unión" proviene de la definición formal de type. Si uno mira el type como el Conjunto de todos los valores que ese type puede ser, un unión type es simplemente la Unión de conjuntos de los types que lo constituyen, puesto que es capaz de almacenar cualquier valor que puedan sus elementos. Además, puesto que la unión matemática evita los duplicados, si más de un campo puede almacenar un valor común, es imposible decir, a partir del valor, qué campo fue el último en ser escrito. (es)
  • In computer science, a union is a value that may have any of several representations or formats within the same position in memory; that consists of a variable that may hold such a data structure. 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". In contrast with a record (or structure), which could be defined to contain both a float and an integer; in a union, there is only one value at any given time. A union can be pictured as a chunk of memory that is used to store variables of different data types. Once a new value is assigned to a field, the existing data is overwritten with the new data. The memory area storing the value has no intrinsic type (other than just bytes or words of memory), but the value can be treated as one of several abstract data types, having the type of the value that was last written to the memory area. In type theory, a union has a sum type; this corresponds to disjoint union in mathematics. Depending on the language and type, a union value may be used in some operations, such as assignment and comparison for equality, without knowing its specific type. Other operations may require that knowledge, either by some external information, or by the use of a tagged union. (en)
Faceted Search & Find service v1.17_git139 as of Feb 29 2024


Alternative Linked Data Documents: ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 08.03.3330 as of Mar 19 2024, on Linux (x86_64-generic-linux-glibc212), Single-Server Edition (61 GB total memory, 38 GB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2024 OpenLink Software