久久久久久久999_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

關閉窗口

相關文章

主站蜘蛛池模板: 久久xxx| 久草黄色 | 一区免费| 欧美激情一区二区三区 | 羞羞的网站 | 精东影业一区二区三区 | 日韩中文字幕在线视频 | 国产亚洲精品码 | 亚洲天堂色图 | 毛片毛片毛片 | a级片网站 | 国产精品久免费的黄网站 | 激情影院在线观看 | 操碰在线视频 | 久久观看 | 日韩黄网 | 日韩一级视频 | 亚洲成人久久久 | 午夜激情福利视频 | 欧美资源在线 | 亚洲一区成人 | 日韩网站在线观看 | 国产h视频在线观看 | 国产精品久久久国产盗摄 | 婷婷五月在线视频 | 91视频在线观看视频 | 欧美精品在线免费观看 | 日本黄色一级视频 | 国产午夜免费视频 | 能看毛片的网站 | 黄色网在线 | 99热最新 | 亚洲三级黄色片 | 久久av资源 | 欧美一区二区在线 | 91精品国产成人www | 秘密爱大尺度做爰呻吟 | 天堂综合网 | 国产一区在线观看视频 | 中文字幕在线观看网址 | 天海翼一区二区 |