Operators
generated from midad spec --json at build time; not edited by hand
The operators where midad differs from the language you are coming from. The rest of the expression grammar is in Control flow.
| operator | result | note |
|---|---|---|
/ | float | always a float; write idiv(a, b) for integer division |
idiv(a, b) | number | integer division, floors: idiv(-7, 2) is -4 |
% | number | integer remainder |
// | comment | // starts a comment; it is not integer division |
== | boolean | 1 == 1.0 is a compile error: numbers and floats never mix implicitly |
+ | string | "a" + 1 is a compile error (E0230); write str(1) |