Data Types
Basic Data Types
In programming, data type is an important concept.
Variables can store data of different types, and different types can do different things.
Unv has the following data types built-in by default, in these categories:
- Text Type:
string
- Numeric Types:
int
,float
(=number
),complex
- Sequence Types:
array
- Mapping Type:
map
- Boolean Type:
boolean
Setting the Data Type
In Unv, the data type is set when you assign a value to a variable:
Example | Data Type |
---|---|
x = "Hello World" | string |
x = 20 | int |
x = 20.5 | float |
x = 1j | complex |
x = ["apple", "banana", "cherry"] | array |
x = {"name" : "John", "age" : 36} | map |
x = true | boolean |
Supported Runtimes
Check is your flavour of Unv is supported.