Operators

The following is a list of operators which are understood by Tao:

  • Arithmetic operators:
        +     addition
        -     subtraction
        *     multiplication
        /     division
        %     modulus
    

  • Bitwise operators:
        ~     not
        <<    shift left
        >>    shift right
        &     bitwise AND
        ^     bitwise XOR
        |     bitwise OR
    

  • Relational operators:
        ==    equal
        !=    not equal
        <     less than
        >     greater than
        <=    less than or equal to 
        >=    greater than or equal to
    

  • Assignment operators:
        += -= *= %= <<= >>= &= ^=
    

  • Logical operators:
        and or not
    
     

    Note that the and operator has higher precedence than the or operator. This means that the expression a and b or c and d evaluates to (a and b) or (c and d).


©1999,2000 Mark Pearson m.pearson@ukonline.co.uk April 30, 2000