Difference between revisions of "Data type"
From Free Pascal wiki
Jump to navigationJump to searchLine 1: | Line 1: | ||
+ | <small>[[data type/it|italiano(it)]] '''englisch'''</small> | ||
+ | |||
A '''data type''' is a classification of a variable or constant. There are certain data types that are predefined by any Pascal compiler (because you need them to make everything else). These are: | A '''data type''' is a classification of a variable or constant. There are certain data types that are predefined by any Pascal compiler (because you need them to make everything else). These are: | ||
Revision as of 16:09, 28 August 2006
italiano(it) englisch
A data type is a classification of a variable or constant. There are certain data types that are predefined by any Pascal compiler (because you need them to make everything else). These are:
- byte - an unsigned number in the range 0 to 255
- char - Single character
- integer - a whole number. FPC currently uses 4 bytes for integers
- real - a number which may have a decimal point and possibly an exponent
- cardinal - a variable which has a group of values to which it may hold only one;
- set - a collection of related elements; size depends on number of elements
- pointer - a reference to a location in memory, generally used for dynamic variables
- record - a combination of the above data types collected together
- object - a hybrid entity that may contain data and procedures to manipulate that data
Other data types are generally made with some combination of the above. FPC adds additional data types.