|
4.5.3 int operations
++
- changes its operand to its successor, is itself no int expression
--
- changes its operand to its predecessor, is itself no int expression
+
- addition
-
- negation or subtraction
*
- multiplication
/
- integer division (omitting the remainder), rounding toward 0
div
- integer division (omitting the remainder >= 0)
%
- integer modulo (the remainder of the division
/ )
mod
- integer modulo (the remainder of the division
div ), always non-negative
^ , **
- exponentiation (exponent must be non-negative)
< , > , <= , >= , == , <>
- comparators
Note: An assignment j=i++; or j=i--; is not allowed,
in particular it does not change
the value of j , see Limitations.
Example:
|