Subtraction (-) - overloaded for Real and Natural types.
natural - natural := natural ~ 2 - 2 := 0
num_t - real := real ~ 2 - 2.3 := 0.3
real - num_t := real ~ 2.3 - 2 := 0.3
Multiplication (*) - overloaded for Real and Natural types.
natural * natural := natural ~ 2 * 2 := 4
num_t * real := real ~ 2 * 2.3 := 4.6
real * num_t := real ~ 2.3 * 2 := 4.6
Division (/) - overloaded for Real and Natural types.
The division operator is also used to delimit control name paths
so this a/b or will be interpreted as a path and a /b will be
interpreted as variable a followed by path /b. Division involving
variables must be written with the division separated by spaces as
in: a / b or even a/ b.
natural / natural := natural ~ 2 / 2 := 1
num_t / real := real ~ 2 / 2.3 := 0.8695
real / num_t := real ~ 2.3 / 2 := 1.15
Remainder (%) - overloaded for Real and Natural types.
natural % natural := natural ~ 3 % 2 := 1
num_t % real := real ~ 4 % 1.5 := 1.0
real % num_t := real ~ 4.5 % 2 := 0.5
Boolean
Negation ( ! )
! bool := bool ~ ! $t := $f
Relational ( & | )
And (&) - comparison of bool types.
bool & bool := bool ~ $t & $f := $t
Or (|) - comparison of bool types.
bool | bool := bool ~ $t | $f := $t
Comparison ( = != > >= < <= )
Comparisons may only be made between the same types.