Data types

Variables are stored in RAM but it is necessary to let the program know the type of data that each variable will hold.

Data typeDescriptionSample data
INTEGERStores positive or negative whole numbers17
REALStores numbers that contain decimal places/values and can also store integers17.65
CHARACTERStores a single character which can be a letter, number or symbol$
STRINGStores alphanumeric combinations and text. String is really a group of characters stored together as one. Numbers to be used for calculations should not be stored as string data even though they can be. They should be stored as INTEGER or REALBitesize
BOOLEANStores True or False only. This is sometimes taught as 1 or 0 only where 1 is true and 0 falseTrue

In some languages the REAL data type is known as SINGLE, DOUBLE or FLOAT instead.