Nambala (Number)
In Duwa, Nambala (Number) is a type that represents numbers. It is used to represent numeric values. Numbers in Duwa are represented using the IEEE 754 standard. In duwa there no difference between integers and floating point numbers.
Syntax
Examples usage
Conversion to Nambala
To explicitly convert a value to a number, you can use the kuNambala
function.
strings
If the string is a valid number, it will be converted to a number. Otherwise, it will be converted to 0
.
Tsimikizi
zoona
is converted to 1
and bodza
is converted to 0
.
Note: Convertion from other types to number is not supported yet. (If it works, it's a bug)