In computer science, type conversion or typecasting refers to changing an entity of one data type into another. This is done to take advantage of certain features of type hierarchies. For instance, values from a more limited set, such as integers, can be stored in a more compact format and later converted to a different format enabling operations not previously possible, such as division with several decimal places' worth of accuracy.

PropertyValue
dbpprop:abstract
  • In computer science, type conversion or typecasting refers to changing an entity of one data type into another. This is done to take advantage of certain features of type hierarchies. For instance, values from a more limited set, such as integers, can be stored in a more compact format and later converted to a different format enabling operations not previously possible, such as division with several decimal places' worth of accuracy. In object-oriented programming languages, type conversion allows programs to treat objects of one type as one of their ancestor types to simplify interacting with them. There are two types of conversion: implicit and explicit. The term for implicit type conversion is coercion. The most common form of explicit type conversion is known as casting. Explicit type conversion can also be achieved with separately defined conversion routines such as an overloaded object constructor. Each programming language has its own rules on how types can be converted. In general, both objects and fundamental data types can be converted.
  • Typumwandlung (engl. type conversion oder cast) bezeichnet in der Informatik die Umwandlung des Wertes eines Datentyps in einen Wert eines anderen Datentyps. Beispielsweise kann es sein, dass man eine Zahl als Zeichenkette darstellen möchte. Es muss dann eine Umwandlung der für die Darstellung der Zahl verwendeten Daten in die für die Darstellung einer Zeichenkette notwendigen Daten vorgenommen werden: string s; // Variable s kann Zeichenkette aufnehmen int i = 42; // Variable i nimmt ganze Zahl 42 auf (z. B. Daten "002A" auf 16-bit Rechner) s = i; // s soll Wert von i annehmen --Typkonflikt-- hier muss Konvertierung erfolgen! // z. B. in "343200" (ASCII Code für Zeichen 4 und 2, sowie C-String Terminator) Oft kann der eine Datentyp den gesamten Wertebereich des anderen Datentyp aufnehmen, so dass man je nach Vergrößerung oder Verkleinerung der Wertemenge des Datentyps von Typerweiterung (engl. type promotion) oder Typeinschränkung (engl. type demotion) spricht. Es gibt explizite und implizite Typumwandlungen.
  • En informatique la conversion de type est le fait de convertir une valeur d'un type (source) dans un autre (cible). On parle aussi de coercition ou de cast. On distingue trois types de conversion (dont un seul mérite vraiment le nom de conversion) suivant la relation de sous-typage existant entre les types source et cible : la conversion entre types incomparables, la coercition ascendante, la coercition descendante.
  • In informatica, con conversione di tipo (oppure impropriamente casting, dal nome di un suo sottotipo) ci si riferisce all'operazione di passaggio di una variabile da un tipo di dato ad un altro: questa conversione è effettuata per avvantaggiarsi di alcune caratteristiche delle gerarchie dei tipi. Per esempio, i valori di un intervallo limitato (come quello degli interi) possono essere immagazzinati in piccole quantità di memoria, per poi essere convertiti in un formato diverso che potenzialmente permette nuove operazioni, come la divisione con varie cifre decimali di precisione. Nei linguaggi di programmazione orientati agli oggetti, la conversione di tipo permette ai programmi di trattare gli oggetti come se fossero di un tipo antenato, ad esempio per semplificarne la manipolazione. Esistono due tipi di conversione di tipo: implicita ed esplicita. Il termine utilizzato per riferirsi alla conversione implicita è coercion, mentre il metodo più comune di conversione esplicita è chiamato casting (sostantivo che, a volte, viene impropriamente usato per indicare il significato generale di conversione). La conversione esplicita può essere eseguita anche con delle funzioni di conversione definite separatemente, come i costruttori sovraccarichi.
  • 型変換(かたへんかん)とはプログラムにおいて、あるデータ型を他のデータ型に変換することである。
  • In de informatica is een typeconversie een operatie die een stukje data van een bepaald gegevenstype converteert naar een ander gegevenstype.
  • Konwersja typu, zmiana typu (zmiennej w odwołaniu, wyrażenia), rzutowanie typu, przekształcenie typu, to konstrukcja programistyczna dostępna w określonym języku programowania, umożliwiająca traktowanie danej pewnego, konkretnego typu, jak daną innego typu, lub taką zmianę tej danej albo jej reprezentacji w pamięci operacyjnej, aby wartość tej danej, odpowiadała według przyjętych kryteriów odwzorowania, danej innego, wybranego typu. Pojęcie konwersji odnosi się także do sytuacji wyboru, rzutowania danych, które nie posiadają przypisanego typu, na wybrany, konkretny typ, celem interpretacji tych danych. Konwersja typu jest więc w swej istocie wykonaniem pewnego, z góry ustalonego, odwzorowania pomiędzy różnymi typami.
  • Приведе́ние ти́па (type conversion) — весьма важная часть многих языков программирования, в особенности функциональных. Означает этот термин следующее: если в какой-то момент тип переменной в составе выражения не задан, он просчитывается (выводится) автоматически. Например, если мы складываем целое число с чем-то неизвестным и хотим получить целое число, ясно, что это неизвестное либо также целое число, либо легко приводится к виду целого числа. Естественно, существуют ситуации, когда для автоматического приведения типов данных недостаточно, тогда применяется явное приведение типа, то есть программист задаёт к какому типу следует привести выражение. Существует два способа приведения типа:
dbpprop:date
  • January 2008
dbpprop:forProperty
  • type conversion (aviation)
  • type conversion in aviation
dbpprop:hasPhotoCollection
dbpprop:reference
dbpprop:wikiPageUsesTemplate
dbpprop:wikibooksparProperty
  • Transwiki
  • Type conversion
rdf:type
rdfs:comment
  • In computer science, type conversion or typecasting refers to changing an entity of one data type into another. This is done to take advantage of certain features of type hierarchies. For instance, values from a more limited set, such as integers, can be stored in a more compact format and later converted to a different format enabling operations not previously possible, such as division with several decimal places' worth of accuracy.
  • Typumwandlung (engl. type conversion oder cast) bezeichnet in der Informatik die Umwandlung des Wertes eines Datentyps in einen Wert eines anderen Datentyps. Beispielsweise kann es sein, dass man eine Zahl als Zeichenkette darstellen möchte.
  • En informatique la conversion de type est le fait de convertir une valeur d'un type (source) dans un autre (cible). On parle aussi de coercition ou de cast. On distingue trois types de conversion (dont un seul mérite vraiment le nom de conversion) suivant la relation de sous-typage existant entre les types source et cible : la conversion entre types incomparables, la coercition ascendante, la coercition descendante.
  • In informatica, con conversione di tipo (oppure impropriamente casting, dal nome di un suo sottotipo) ci si riferisce all'operazione di passaggio di una variabile da un tipo di dato ad un altro: questa conversione è effettuata per avvantaggiarsi di alcune caratteristiche delle gerarchie dei tipi.
  • 型変換(かたへんかん)とはプログラムにおいて、あるデータ型を他のデータ型に変換することである。
  • In de informatica is een typeconversie een operatie die een stukje data van een bepaald gegevenstype converteert naar een ander gegevenstype.
  • Konwersja typu, zmiana typu (zmiennej w odwołaniu, wyrażenia), rzutowanie typu, przekształcenie typu, to konstrukcja programistyczna dostępna w określonym języku programowania, umożliwiająca traktowanie danej pewnego, konkretnego typu, jak daną innego typu, lub taką zmianę tej danej albo jej reprezentacji w pamięci operacyjnej, aby wartość tej danej, odpowiadała według przyjętych kryteriów odwzorowania, danej innego, wybranego typu.
  • Приведе́ние ти́па (type conversion) — весьма важная часть многих языков программирования, в особенности функциональных. Означает этот термин следующее: если в какой-то момент тип переменной в составе выражения не задан, он просчитывается (выводится) автоматически.
rdfs:label
  • Type conversion
  • Typumwandlung
  • Conversion de type
  • Conversione di tipo
  • 型変換
  • Typeconversie
  • Konwersja typu
  • Приведение типа
owl:sameAs
skos:subject
foaf:page
is dbpprop:disambiguates of
is dbpprop:redirect of
is owl:sameAs of