စံကား

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

PageOperators
Arithmetic+ - * / % and negation
Comparison== != < > <= >=
Logicand, or, not
Bitwise operators& | ^ ~ << >>
Converting between kindschange a value's kind
Grouping and orderparentheses, and which operator goes first

Next: Arithmetic.