diff options
| author | Marti Bolivar <mbolivar@mit.edu> | 2010-11-28 11:23:33 -0500 | 
|---|---|---|
| committer | Marti Bolivar <mbolivar@mit.edu> | 2010-11-28 11:23:33 -0500 | 
| commit | d9cbd78e29d42e70bb46641dd43ee0772c8c975f (patch) | |
| tree | 80a67cba4468dbcd89b3cd23ad56695b1f146c66 /source/arduino/arithmeticcompound.rst | |
| parent | 546b34076d230b617ba86defb6b90cd934b01878 (diff) | |
| download | librambutan-d9cbd78e29d42e70bb46641dd43ee0772c8c975f.tar.gz librambutan-d9cbd78e29d42e70bb46641dd43ee0772c8c975f.zip | |
reorganized all the arduino/ docs into a lang/ subdirectory since
they're properly CC attributed now.
Diffstat (limited to 'source/arduino/arithmeticcompound.rst')
| -rw-r--r-- | source/arduino/arithmeticcompound.rst | 46 | 
1 files changed, 0 insertions, 46 deletions
| diff --git a/source/arduino/arithmeticcompound.rst b/source/arduino/arithmeticcompound.rst deleted file mode 100644 index 734ef9d..0000000 --- a/source/arduino/arithmeticcompound.rst +++ /dev/null @@ -1,46 +0,0 @@ -.. highlight:: cpp - -.. _arduino-arithmeticcompound: - -Compound Arithmetic Operators (``+=`` , ``-=``, ``*=``, ``/=``) -=============================================================== - -Description ------------ - -Perform a mathematical operation on a variable with another constant -or variable.  These operators are just a convenient shorthand:: - -    x += y;   // equivalent to the expression x = x + y; -    x -= y;   // equivalent to the expression x = x - y; -    x *= y;   // equivalent to the expression x = x * y; -    x /= y;   // equivalent to the expression x = x / y; - -Here is an example:: - -    int x = 2; -    int y = 10; - -    x += 4;          // x now contains 6 -    x -= 3;          // x now contains 3 -    x *= y;          // x now contains 30 -    x /= 2;          // x now contains 15 -    x += max(20, 6); // x now contains 35 -    x -= sq(5);      // x now contains 15 - -Parameters ----------- - -**x**: a numeric variable - -**y**: a numeric variable, number constant, or any other expression -that evaluates to a number (e.g. call to a function that returns a -number). - -See Also --------- - -- :ref:`Arithmetic operators <arduino-arithmetic>` - - -.. include:: cc-attribution.txt
\ No newline at end of file | 
