This tutorial explains different datatypes provided by the NIM Programming language.
Let’s discuss different datatypes
An integer is a numerical datatype used to declare numerical values.
Example values 2,-56,101
int64 to represent integer values.
It contains int and uint to represents
Floats are floating numbers and examples are 1.1,-4.2,
- Character data type
char is used to represent a single character. Characters can be ASCII or alphabet characters.
Characters are defined using a single tick operator
let character = `a`
- Strings data type
The string data type is used to represent a group of characters enclosed in double-quotes.
let name = "abcdef"
- Bool data type
Boolean contains true and false values. It is used to represent the truthness of a NIM expression.
It is used in Control flow statements and relational operators.
let exists = true let enable = false
What type of byte is Nim?
Nim contains byte type to store binary blob objects.
use seq[byte]To deal with binary data.
It is similar to or equal to uint8.