Data

Data types

Character

A single character: letter, number, or symbol. Contained in quote marks.

"a"
"1"
"@"

String

A string of characters. Contained in quote marks.

"Hello world"
"00.1200"
",./#';"
"Pa55w0rd|"

Integer

A whole number, positive and negative. Not contained in quotes.

1234
0
-4321

Real

A decimal number, positive and negative. Not contained in quotes.

3.14
0.0
-3.14

Boolean

A binary choice. Not contained in quotes.

True
False

Data structure

An array can hold multiple values of the same data type, all within square brackets ([ ]).

Array of characters

["a", "g", "z", "d"]

Array of strings

["hat", "mat", "sat"]

Array of integers

[47, -6, 99, 1001]

Array of real

[3.14, -89.65, 0.0]

Array of Boolean

[True, True, False]