[Compound Operators]
説明
This is a convenient shorthand to perform addition on a variable with another constant or variable.
構文
x += y; // equivalent to the expression x = x + y;
媒介変数
x: variable. Allowed data types: int, float, double, byte, short, long.y: variable or constant. Allowed data types: int, float, double, byte, short, long.
例
x = 2; x += 4; // x now contains 6
See also
- [Language] Normal Addition
Language Reference Home
86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License下でライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。



