6.8.1.4 Operators

Parenthesized expressions within expressions are evaluated first, then operators by precedence. Operators with the same precedence are evaluated from left to right for binary operators, right to left for unary operators. Table 6-3 describes the operators available in expressions.

Table 6-3: Operators (by precedence)                                       

Operator Description Type Precedence                                          

- negative unary 7 (highest)                                                  

+ positive unary 7                                                            

! logical not unary 7                                                         

* multiplication binary 6                                                     

/ division binary 6                                                           

% modulo binary 6                                                             

+ addition binary 5                                                           

- subtraction binary 5                                                        

:: string concatenation binary 4                                              

<= less than or equal binary 3                                              

!= not equal binary 3                                                         

>= greater than or equal binary 3                                           

< less than binary 3                                                        

= equal binary 3                                                              

> greater than binary 3                                                     

& logical and binary 2                                                     

| logical or binary 1 (lowest)