[Compound Operators]
描述
Decrements the value of a variable by 1.
語法
x--; // decrement x by one and returns the old value of x --x; // decrement x by one and returns the new value of x
參數
X: variable. Allowed data types: int, long (possibly unsigned).
回傳
The original or newly decremented value of the variable.
範例程式碼
x = 2; y = --x; // x now contains 1, y contains 1 y = x--; // x contains 0, but y still contains 1
語法參考主頁面
86Duino 參考的文本是根據 知識共享署名-相同方式分享 3.0 許可證,部分文本是從 Arduino 參考 修改的。 參考中的代碼示例已發佈到公共領域。



