[Next] [Previous] [Up] [Top] [Contents] [Index]

13. Expressions

13. 8. Operator Precedence

Operators can be combined at will, as long as the values have the correct type. If operators are mixed in an expression, they are evaluated in the following order:

1. - (unary), ! (not)
2. *, /, %
3. +, -
4. =, !=, <, <=, >, >=
5. & (and)
6. | (or)

Operators that have the same precedence are evaluated from left to right.

The evaluation order can be changed by using parantheses. Subexpressions enclosed in parantheses are evaluated first.

Examples

Examples

MOLMOL Manual - 7 Oct 1997

[Next] [Previous] [Up] [Top] [Contents] [Index]

Generated with Harlequin WebMaker