Noeud « Previous »: Declarations, Noeud « Up »: Semantics



1.3.2 Expressions

Boolean operators
Appel is not clear wrt the values returned by the operators && and ||. Because they are implemented as syntactic sugar, one could easily make 123 || 456 return 1 or 123. For the time being the “right” result is considered being 123. Similarly 123 && 456 is 456. This is unnatural, but it is what is the most consistent with the suggested implementation. In the future (a different class), this might change. But anyway, no test will depend on this.
Precedence and Associativity
Precedence of the op (high to low):
          * /
          + -
          >= <= = <> < >
          &
          |
     

All the associative operators are associative to the left.