Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo C - <b>- unary negation operator; binary subtraction</b> http://www.X-Hacker.org [<<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 +

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson