admin 管理员组

文章数量: 1184232


2024年4月27日发(作者:汇编程序的概念)

arduino语法和phtoy

Arduino 的程序可以划分为三个主要部分:结构、变量(变量与常量)、

函数。

一、结构

1.1 setup()

1.2 loop()

二、结构控制

2.1 if

2.lse

2.3 for

2.4 switch case

2.5 while

2. while

2.7 break

2.8 continue

2.9 return

2.10 goto

三、扩展语法

3.1 ;(分号)

3.2 {}(花括号)

3.3 //(单行注释)

3.4 /* */(多行注释)

3.5 #define

3.6 #include

四、算数运算符

4.1 =(赋值运算符)

4.2 +(加)

4.3 -(减)

4.4 *(乘)

4.5 /(除)

4.6 %(模)

五、比较运算符

5.1 ==(等于)

5.2 !=(不等于)

5.3 <(小于)

5.4 >(大于)

5.5 <=(小于等于)

5.6 >=(大于等于)

六、布尔运算符

6.1 &&(与)

6.2 ||(或)

6.3 !(非)

七、指针运算符

7.1 * 取消引用运算符

7.2 & 引用运算符

八、位运算符

8.1 & (bitwise and)

8.2 | (bitwise or)

8.3 ^ (bitwise xor)

8.4 ~ (bitwise not)

8.5 << (bitshift left)

8.6 >> (bitshift right)

九、复合运算符

9.1 ++ (increment)

9.2 -- (decrement)

9.3 += (compound addition)

9.4 -= (compound subtraction)

9.5 *= (compound multiplication)

9.6 /= (compound division)

9.6 &= (compound bitwise and)

9.8 |= (compound bitwise or)


本文标签: 运算符 变量 结构 引用 部分