大好きArduino

Arduino総合情報サイト

Arduino文法

+= / -= / *= / /= / %=

2016/06/09

Arduinoにおける 文法は標準C言語の と特に変わりはありません。

●Example from Arduino Web Site

<pre>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; 
x %= y;  // equivalent to the expression x = x % y; 

x = 2;
x += 4;      // x now contains 6
x -= 3;      // x now contains 3
x *= 10;     // x now contains 30
x /= 2;      // x now contains 15
x %= 5;      // x now contains 0

Arduino 原文

-Arduino文法