short

描述

short 是 16 位元的整數型別。

在 86Duino 上,short 變數可儲存 16 位元的整數值,範圍由 -32768 到 32767 (最小值 -2^15,最大值 (2^15) – 1)。

範例


short ledPin = 13;

語法


short var = val;

var – short 變數名稱
val – 指派給變數的數值

See also

byte
int
unsigned int
long
unsigned long
Integer Constants
Variable Declaration


語法參考主頁面

本頁由熱血青年 LBU 譯自英文版。

The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.