亚洲春色中文字幕久久久-三上亚,一吻二脱三床四吻胸,国产真实伦对白视频全集,在线毛片观看,精品成品入口黄网,国产毛aⅴ片久久久,亚洲AV色香蕉一区二区三区老师,萧皇后A级艳片,色情日本视频更新,99久久亚洲精品日本无码

專注電子技術學習與研究
當前位置:單片機教程網 >> Arduino >> 瀏覽文章

Arduino復合運算符

作者:huqin   來源:本站原創   點擊數:  更新時間:2014年04月03日   【字體:

+= , -= , *= , /=
Description描述
Perform a mathematical operation on a variable with another constant or variable. The += (et al) operators are just a convenient shorthand for the expanded syntax, listed below.
對一個變量和另一個參數或變量完成一個數學運算。+=(以及其他)可以縮短語法長度。

 

Syntax語法
x += y; // equivalent to the expression x = x + y; // 等價于 x = x + y;
x -= y; // equivalent to the expression x = x - y; // 等價于 x = x - y;
x *= y; // equivalent to the expression x = x * y; // 等價于 x = x * y;
x /= y; // equivalent to the expression x = x / y; // 等價于 x = x / y;

Parameters參數
x: any variable type
x:任何變量類型

y: any variable type or constant
y:任何變量類型或常數

Examples范例
x = 2;
x += 4; // x now contains 6 // x現在為6
x -= 3; // x now contains 3 // x現在為3
x *= 10; // x now contains 30 // x現在為30
x /= 2; // x now contains 15 // x現在為15


Syntax語法
x++; // increment x by one and returns the old value of x
// 將x的值加1并返回原來的x的值。 ++x; // increment x by one and returns the new value of x // 將x的值加1并返回現在的x的值。
x-- ; // decrement x by one and returns the old value of x // 將x的值減1并返回原來的x的值。
--x ; // decrement x by one and returns the new value of x // 將x的值減1并返回現在的x的值。

Parameters參數
x: an integer or long (possibly unsigned)
x:一個整數或長整數(可以無符號)

Returns返回
The original or newly incremented / decremented value of the variable.
返回變量原始值或增加/消耗后的新值。

Examples范例
x = 2;
y = ++x; // x now contains 3, y contains 3 // x現在為3,y為3
y = x--; // x contains 2 again, y still contains 3 // x現在仍然為2,y將為3

關閉窗口

相關文章