User Tools

Site Tools


Sidebar

Welcome to DIDO WIKI

dido:public:ra:xapend:xapend.a_glossary:d:data_type

Data Type

Return to Glossary

A Data Type is a classification that specifies which type of value a variable has and what type of mathematical, relational or logical operations can be applied to it without causing an error. A string, for example, is a Data Type that is used to classify text and an integer is a Data Type used to classify whole numbers.

Data Type Used for Example
String Alphanumeric characters hello world, Alice, Bob123
Integer Whole numbers 7, 12, 999
Float (floating point) Number with a decimal point 3.15, 9.06, 00.13
Character Encoding text numerically 97 (in ASCII, 97 is a lower case 'a')
Boolean Representing logical values TRUE, FALSE

The Data Type defines which operations can safely be performed to create, transform and use the variable in another computation. When a program language requires a variable to only be used in ways that respect its Data Type, that language is said to be strongly typed. This prevents errors, because while it is logical to ask the computer to multiply a float by an integer (1.5 x 5), it is illogical to ask the computer to multiply a float by a string (1.5 x Alice). When a programming language allows a variable of one Data Type to be used as if it were a value of another Data Type, the language is said to be weakly typed.

Technically, the concept of a strongly typed or weakly typed programming language is a fallacy. In every programming language, all values of a variable have a static type – but the type might be one whose values are classified into one or more classes. And while some classes specify how the Data Type’s value will be compiled or interpreted, there are other classes whose values are not marked with their class until run-time. The extent to which a programming language discourages or prevents type error is known as type safety.

Source: https://searchapparchitecture.techtarget.com/definition/data-type

dido/public/ra/xapend/xapend.a_glossary/d/data_type.txt · Last modified: 2021/10/29 17:23 by nick
Translations of this page: