User`s manual
4-19
Type Conversion
When operations are performed on one or two numbers, the result must be
typed as integer, double or single-precision.
When a +, -, or * operation is performed, the result will have the same degree
of precision as the most precise operand. For example, if one operand is
single-precision, and the other double-precision, the result will be double
precision. Only when both operands are integers will a result be integer. If
the result of an integer *, -, or + operation is outside the integer range, the
operation will be done in single precision and the result stored as single
precision.
Division follows the same rules as +, * and -, except that it is never done at
the integer level: when both operators are integers, the operation is done in
single precision with a single-precision result.
During a compare operation (< , >,=,etc.) the operands are converted to the
same type before they are compared. The less precise type will always be
converted to the more precise type.
If you are using logical operators for bit manipulations or Boolean operations
(see Chapter 8, "Logical Operators"), you'll need to read the next paragraph;
otherwise, skip it.
The logical operators AND, OR and NOT first convert their operands to
integer form. If one of the operands is outside the allowable range for integers
(-32768 to +32767) an overflow error occurs. The result of a logical operation
is always an integer.