Skip to content
Paul Squires edited this page Sep 19, 2026 · 1 revision

Home › Standard Data Types › Short

Short

Standard data type: 16 bit signed

Syntax

Dim variable As Short

Description

16-bit signed whole-number data type. Can hold values from -32768 to 32767.

Remarks

Dialect Differences

  • Not available in the -lang qb dialect unless referenced with the alias __Short.

Differences from QB

  • The name "short" is new to FreeBASIC, however they are the same as integers in QB

See also

Examples

Dim x As Short = CShort(&H8000)

  Dim y As Short = CShort(&H7FFF)

  Print "Short Range = "; x; " to "; y

Output:

Short Range = -32768 to  32767

Category: Standard Data Types
Kind: keyword


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally