[Next] [Up] [Previous] [Contents]
Next: Integer constants Up: Expressions Previous: Expressions

Parentheses and precedence

Parentheses ``()'' may always be put around an expression, without changing its value. If parentheses are omitted, then the order of operators is determined by their priority. The operators are listed here in order of priority, from ``strongest binding'' to ``weakest binding'':

        ::                (concatenation)
        -                 (unary minus sign)        
        *,/,<<,>>         (mult, div, left shift,right shift)
        +,-               (add, subtract)
        mod               (integer mod)
        in                (set inclusion)
        union             (set union)
        =,~=,<,<=,>,>=    (comparison operators)
        ~                 (not)
        &                 (and)
        |,^               (or, exclusive or)
        <->               (iff)
        ->                (implies)
        ,                 (tuple separator)
        ?:                (conditional)
        ..                (integer subrange)



Ken McMillan
Sat Jun 6 21:41:59 PDT 1998