++ / --
来自YFRobotwiki
递增或递减某个变量
x++; // increment x by one and returns the old value of x ++x; // increment x by one and returns the new value of x 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: 整型或者长整型变量(包含无符号整型)
变量执行完递增或递减后的旧值和新值
x = 2; y = ++x; // x = 3, y = 3 y = x--; // x = 2, y = 3
|
更多建议和问题欢迎反馈至 YFRobot论坛