Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>op= compound assignment operator</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
op=                      Compound Assignment operator

 lval  op=  exp          compound assignment
 lval                    any variable that can be assigned to
 op                      any binary operator except && or ||
 exp                     any compatible expression

    The op= operator is a shortcut for the expression

           lval = lval op exp;

    In other words, it performs the indicated operation, then assigns the
    result to lval.  If lval is a pointer and op is + or -, then exp can
    be of an integral type.

  -------------------------------- Examples ---------------------------------

            i  *=  j;             -->            i = i  * j;
            i  /=  j;             -->            i = i  / j;
            i  %=  j;             -->            i = i  % j;
            i  +=  j;             -->            i = i  + j;
            i  -=  j;             -->            i = i  - j;
            i  <<= j;             -->            i = i << j;
            i  >>= j;             -->            i = i >> j;
            i  &=  j;             -->            i = i  & j;
            i  ^= j;             -->            i = i ^ j;
            i  |=  j;             -->            i = i  | j;

See Also: = * / % + - << >> & | ^^

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