[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
- Unary Negation operator; Binary Subtraction
-exp1 Unary Arithmetic negation
exp1 any real or integer expression
exp1 - exp2 Binary subtraction
exp1 any real or integer expression
exp2 any real or integer expression
The unary operator - performs arithmetic negation. The result is the
negative value of exp1; by definition, exp1 + -exp1 yields zero (0).
As a binary operator, - performs subtraction. The result depends
upon the operands and follows the usual arithmetic conversion. Note
that subtraction is not commutative: (A-B) <> (B-A). Examples:
i = 3223 - 88; /* i == 3135 */
x = 3.5 - 4.5; /* x == -1.0 */
See Also:
Conversions
+
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson