User`s manual

232 digi.com Operators
Certain operators, namely *, &, (), [], -> and . (dot), can be used on the left side of an assign-
ment to construct what is called an lvalue. For example,
When the data types for an operation are mixed, the resulting type is the more precise.
By placing a type name in parentheses in front of a variable, the program will perform type casting or type
conversion. In the example above, the term (float)i means the the value of i converted to floating
point.”
The operators are summarized in the following pages.
13.1 Arithmetic Operators
Unary plus, or binary addition. (Standard C does not have unary plus.) Unary plus does not really do any-
thing.
a = b + 10.5; // binary addition
z = +y; // just for emphasis!
Unary minus, or binary subtraction.
a = b - 10.5; // binary subtraction
z = -y; // z gets the negative of y
float x;
*(char*)&x = 0x17; // low byte of x gets value
float x, y, z;
int i, j, k;
char c;
z = i / x; // same as (float)i / x
j = k + c; // same as k + (int)c
+