05
Operators
Work with values using words or signs.
An operator works on values and gives a new value: + adds, < compares. Zaka offers
two forms for most operators:
- with signs, as in school maths:
က + ခ - with words, as a Burmese phrase:
က နှင့် ခ ၏ ပေါင်းလဒ်("the sum of k and kh")
စံကား
Expected output
၂၂
၂၂
မှန်
မှန်
Signs are short. Words read like Burmese. Pick whichever makes the program clearer to read, and mix the two at will.
In this chapter
| Page | Operators |
|---|---|
| Arithmetic | + - * / % and negation |
| Comparison | == != < > <= >= |
| Logic | and, or, not |
| Bitwise operators | & | ^ ~ << >> |
| Converting between kinds | change a value's kind |
| Grouping and order | parentheses, and which operator goes first |
Next: Arithmetic.