click below
click below
Normal Size Small Size show me how
Data types
Different types of data
| Term | Definition |
|---|---|
| String | A sequence of characters. Used to store a representation of text 'Hello World' '0300 123 4999' 'me@email.com' . |
| Character | This can contain any keyboard character inclusive of special characters and the return character. a A @ 1 |
| Integer | Any whole number (inclusive of negatives and zero). For efficiency, most programming languages will offer a varying size. In increasing order, these are ‘short’, ‘int’ and ‘long’. These can be used when accuracy isn’t of high priority. 42 0 -300 |
| Floating point/ real | Real numbers are what you may think of as decimals, i.e. numbers with decimal points. They are often referred to as ‘float’ because 0.00012 is stored as standard form 1.2 x 10‒4, i.e. with a floating decimal point. 3.14159 -0.11 5.0 |
| Boolean | Stores whether a condition is TRUE or FALSE. Default is set to FALSE unless defined otherwise. Programming languages that do not support Boolean variables might use integers instead (0 is FALSE and 1 is TRUE). True False |
| Date/Time | A representation of a moment in time. Can be used to return items in either long or short format. 01-Jan-18 01/01/2018 13:00 |