Implementation: Data types and structuresData structures

Data is stored differently depending on its type. Numbers are stored as integers or real numbers, text as string or characters. Lists of the same type of data can be stored in an array.

Part ofComputing ScienceSoftware design and development

Data structures

Structures allow programmers to store more than one item or value together.

While STRING is regarded as a data type, it is also a data structure. The STRING data type is an array of different characters all stored together in sequence.

For example, the name Anne is really four separate characters 'A', 'n', 'n', 'e' that when joined together give the name 'Anne'.

Arrays are another common data structure. They let programmers store items in a list.

DECLARE firstName AS STRING INITIALLY ['Cho', 'Eve', 'Joseph', 'Uzair']

The code shown above creates an array of strings storing four different names.