Topic: DMD0096 MATH Add Operator |
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The Math Add operator ( + ) will calculate the sum of two or more numbers or expressions.
The numbers and expressions can be any mix of signed integers, unsigned integers, real (floating point) numbers or discrete values. They can be any numeric or discrete memory location or any numeric or discrete structure member.
All discrete and 16-bit integer values are promoted to 32-bit 2's complement signed integer values. If a Real value is included in the equation then all of the values will be promoted to Real values and all calculations will be performed using Real numbers.
Traditional math precedence rules are used to solve the math expression. The use of parentheses to remove any ambiguity in the processing order is encouraged.
Refer to the examples below for caveats when using numbers of different types:
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
See Also:Add
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Related Topics:
|
||||||||||||||||||||||||||||||
|