Arduino IDE 結構 Structure

結構 Structure

控制迴圈

Further Syntax符號語法

  • ; (semicolon)分號
  • {} (curly braces)大括號
  • // (single line comment)單行註釋
  • /* */ (multi-line comment)多行註釋
  • #define 定義
  • #include  包含

Arithmetic Operators數學運算符號

  • = (assignment operator)
  • (addition)
  • (subtraction)
  • * (multiplication)
  • / (division)
  • % (modulo)

Comparison Operators

  • == (equal to)
  • != (not equal to)
  • < (less than)
  • > (greater than)
  • <= (less than or equal to)
  • >= (greater than or equal to)

Boolean Operators

  • && (and)
  • || (or)
  • ! (not)

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所有之商標。