結構 Structure
控制迴圈
- if 如果
- if…else 如果…否則
- for 計數
- switch case 分支
- while 直到
- do… while 做..直到
- break 直接跳出
- continue 繼續
- return 回傳
- goto 跳躍
Further Syntax符號語法
- ; (semicolon)分號
- {} (curly braces)大括號
- // (single line comment)單行註釋
- /* */ (multi-line comment)多行註釋
- #define 定義
- #include 包含
Arithmetic Operators數學運算符號
Comparison Operators
- == (equal to)
- != (not equal to)
- < (less than)
- > (greater than)
- <= (less than or equal to)
- >= (greater than or equal to)
Boolean Operators
Pointer Access Operators
Bitwise Operators
- & (bitwise and)
- | (bitwise or)
- ^ (bitwise xor)
- ~ (bitwise not)
- << (bitshift left)
- >> (bitshift right)
Compound Operators
- ++ (increment)
- — (decrement)
- += (compound addition)
- -= (compound subtraction)
- *= (compound multiplication)
- /= (compound division)
- %= (compound modulo)
- &= (compound bitwise and)
- |= (compound bitwise or)
資料來源: Arduino.cc 更正、建議和新的文件應發布到論壇。
Arduino的所有開源文件是根據 知識共享署名-相同方式共享3.0許可協議。相關開源文件代碼範例分享時亦請遵守相同協議。Arduino屬於Arduino所有之商標。