Topic: DMD0097 Math Subtract Operator |
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
The Math Subtract operator ( - ) will calculate the difference between two or more numbers or expressions by subtracting the value on the right side of the operator from the value on the left side of the operator.
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.
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.
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.
Refer to the examples below for caveats when using numbers of different types:
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
See Also:Subtract
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
Related Topics:
|
|||||||||||||||||||||||||||||||||
|