Data type
In
programming languages a data type defines a set of values and the allowable operations on those values. For example, in the
Java programming language, the "int" type represents the set of 32-bit integers ranging in value from -2,147,483,648 to 2,147,483,647, and the operations such as addition, subtraction, and multiplication that can be performed on integers. Almost all programming languages explicitly include the notion of data type, though different languages may use different terminology. Common data types in programming languages include those that represent integers, floating point numbers, and characters, and a language may support many more. Most programming languages also allow the programmer to define additional data types, usually by combining multiple elements of other types and defining the valid operations of the new data type. For example, a programmer might create a new data type named "Person" that specifies that data interpreted as Person would include a name and a date of birth.
See more at Wikipedia.org...
Type (informatique)
Datentyp
Dynamiczne typowanie
Dynamiczne typowanie, to inaczej dynamiczne nadawanie
typów zmiennym. Jest co cecha niektórych
języków programowania.Przy zastosowaniu dynamicznego typowania, zmienne nie mają przypisanych do siebie na sztywno typów. W takiej sytuacji, typ zmiennej wynika z wartości jaką dana zmienna przechowuje. Ułatwia to znakomicie operacje na zmiennych, utrudnia natomiast kontrolę integralności programu - w razie wykonania podejrzanej operacji - np. do zmiennej zawierającej łańcuch "ala" przypiszemy liczbę 5 - kompilator o sztywnym typowaniu niechybnie zwróci błąd w kodzie. Program w języku zezwalającym na typowanie dynamiczne może zachować się dwojako:w przypadku języków nie stosujących silnej kontroli typów (ang. type-safety), np.
PHP, po prostu zmieni typ zmiennej z łańcuchowego na liczbowy i przypisze jej nową wartość w przypadku języków stosujących silną kontrolę typów, np. Ruby, wystąpi błąd w trybie runtime
W celu uzyskania więcej informacji, zobacz w Wikipedia.οrg...
© W niniejszym artykule wykorzystano materialy pochodzace z
Wikipedia® i posiada on Powszechna
Licencje Publiczna GNU
Tipo di dato
In
informatica un tipo di dato (o semplicemente tipo) è un nome che indica l'insieme di valori che una
variabile, o il risultato di un'
espressione, possono assumere e le operazioni che su tali valori si possono effettuare. Dire per esempio che la variabile X è di tipo "numero intero" significa affermare che X può assumere come valori solo
numeri interi (appartenenti ad un certo intervallo) e che su tali valori sono ammesse solo certe operazioni (ad esempio le operazioni
aritmetiche elementari).
Per saperne di più visita Wikipedia.org...