[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Precedence

    Operators--indeed, all expressions--have  an inherent precedence;  that
    is,  in  the  absence  of  explicit grouping (through parentheses), the
    order of evaluation of an expression depends upon the precedence of the
    elements involved.  Operators of higher precedence are evaluated before
    operators of lower precedence.

    In the table  below, elements on  the same line  have equal precedence.
    The first two  lines contain unary  operators; that is,  they take only
    one argument.  The remaining lines contain binary operators--they  take
    two  arguments.    Note  that  some  symbols have both unary and binary
    definitions.

   --------------------------- Precedence -------------------------------
   Operator                                                 Associativity
   ----------------------------------------------------------------------
   identifier   constant   ()   []                          left to right
   !   ~   ++   --   -     +                                right to left
   ^                                                        right to left
   *   /   %                                                left to right
   +   -                                                    left to right
   . (or adjacency)                                         left to right
   <<  >>                                                   left to right
   <   <=   >   >=                                          left to right
   ==  !=                                                   left to right
   ~~  !~                                                   left to right
   &                                                        left to right
   @                                                        left to right
   |                                                        left to right
   &&                                                       left to right
   ||                                                       left to right
   ?:                                                       right to left
   =  =  *=  /=  %=  +=  -=  <<=  >>=  &=  @=  |=          right to left
   ,                                                        left to right
   ----------------------------------------------------------------------

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson