Data Types

Data values in a program can have one of five different Types: Numeric, Logic, Text, Numeric Array, and Logic Array. The Inputs and Outputs of Programming Blocks, Data Wires, Variables, and Constants all have one of these types.
Numeric
The Numeric type represents a number. A Numeric value can be positive or negative, and it can have digits after the decimal point.
TypeExamples
Numeric 3
1.25
-75
87456.3487
-0.002
Logic
The Logic type represents a True or False value. The only two possible Logic values are True and False.
TypeAllowed Values
Logic True
False
Text
The Text type represents a text string, which is a sequence of text characters, like a text message. A Text value can be a word, a single letter, a sentence, or any sequence of characters in the Supported Text character text.
TypeExamples
Text Hello
A
This is a longer text
Aa123@#$%-+=
Numeric Array
The Numeric Array type represents a list of numbers. The list has a certain length, and each element in the list is a Numeric value. An array can have any number of elements (limited by the available memory on the EV3 Brick). The elements are in a specific order, and there can be duplicates.

For example, you could use a Numeric Array to specify the Set of Colours for the Colour Sensor block in Compare – Colour mode.

A Numeric Array displays as a list of numbers separated by semicolons (“;”). The entire list is enclosed in square brackets (“[ ]”). Some examples are shown below.
Numeric ArrayLength
[]0
[3]1
[2; 3; 5]3
[0; -0.2; 845.25; 5; 5; 5]6
You can create an array, add elements, access individual elements, and measure the length of an array using the Array Operations block. You can also create an array with the Variable block.
Logic Array
The Logic Array type represents a list of Logic values. This is similar to the Numeric Array type as described above, except that each element in the array is a Logic value and can only have the values True or False.
Data Types
Quick links