Short:修訂版本之間的差異

從 YFRobotwiki
跳到: 導覽搜尋
(以“ {| border="0" cellpadding="20" width="100%" |- |width="100%" valign="top" align="left"| <font color="orange" size="+1">'''描述'''</font> A short is a 16-bit d...”为内容创建页面)
 
 
(由1名用戶作出的3個中途修訂版本未被顯示)
第 1 行: 第 1 行:
 
 
 
{| border="0" cellpadding="20" width="100%"
 
{| border="0" cellpadding="20" width="100%"
 
|-
 
|-
 
|width="100%" valign="top" align="left"|
 
|width="100%" valign="top" align="left"|
 
 
 
<font color="orange" size="+1">'''描述'''</font>
 
<font color="orange" size="+1">'''描述'''</font>
  
第 38 行: 第 34 行:
 
:- [[unsigned long]]
 
:- [[unsigned long]]
 
:- [[Integer constants(整型常量)]]
 
:- [[Integer constants(整型常量)]]
 
 
 
|}
 
|}
 
 
  
 
----
 
----

2017年9月10日 (日) 21:09的最新修訂版本

描述

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論壇