Short

来自YFRobotwiki
2017年9月10日 (日) 21:08Allblue讨论 | 贡献的版本

跳转至: 导航搜索

描述

A short is a 16-bit data-type.

On all Arduinos (ATMega and ARM based) a short stores a 16-bit (2-byte) value. This yields a range of -32,768 to 32,767 (minimum value of -2^15 and a maximum value of (2^15) - 1).


语法

short var = val;
- var - your short variable name
- val - the value you assign to that variable


示例

short ledPin = 13;


扩展阅读

- byte
- int
- unsigned int
- long
- unsigned long
- Integer constants(整型常量)




返回Arduino语法参考列表

更多建议和问题欢迎反馈至 YFRobot论坛