ABL electronic PIC12 Benutzerhandbuch

Seite von 312
Arithmetic Operators
Arithmetic operators are used to perform mathematical computations. They have
numerical operands and return numerical results. Type char technically represents
small integers, so char variables can used as operands in arithmetic operations.
All of arithmetic operators associate from left to right.
Note: Operator 
*
is context sensitive and can also represent the pointer reference
operator. See Pointers for more information.
mikroC - C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
102
MikroElektronika:  Development  tools  -  Books  -  Compilers
page
Operator
Operation
Precedence
+
addition
12
-
subtraction
12
*
multiplication
13
/
division
13
%
returns the remainder of integer division (can-
not be used with floating points)
13
+
(unary)
unary plus does not affect the operand
14
-
(unary)
unary minus changes the sign of operand
14
++
increment adds one to the value of the
operand
14
--
decrement subtracts one from the value of the
operand
14