Numeric
There are 3 numeric types in NC: int, uint, and float.
Integer
Section titled “Integer”The int type is a 64-bit signed integer type.
You can declare ints by simply writing a number without a decimal point.
int my_num = 1;The uint type is a 64-bit unsigned integer. A uint can be declared similarly to an int:
uint my_num = 1; // cannot be negativeuint my_num = 1u; // can also use the `u` suffixHexadecimal and Octal
Section titled “Hexadecimal and Octal”Hexadecimal numbers need to be prefixed with 0x, for example, 0xFF. The part after the 0x is case-insensitive.
Octal numbers need to be prefixed with 0o, for example, 0o777.
The float type is a 64-bit floating point number, following the IEEE 754 standard. It can be declared by writing a number with a decimal point.
float my_float = 1.0;