Skip to content

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.

Examples ​

start GeSHi

vb
  Dim x As Short = CShort(&H8000)
  Dim y As Short = CShort(&H7FFF)
  Print "Short Range = "; x; " to "; y

end GeSHi

Output:

Short Range = -32768 to  32767

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 ​

  • Ushort
  • Cshort
  • Table with variable types overview, limits and suffixes

Back to DocToc

Translated from FreeBASIC official docs. Contact us for removal if infringed.
FreeBASIC is an open-source project, not affiliated with Microsoft