Skip to content
Narta Xaymar Dirks edited this page Nov 1, 2026 · 9 revisions
BlitzLLVM

Short 〔BlitzLLVM〕

Short(value)
Short:Int16(value)

Returns: The Short.

Description

〔BlitzLLVM〕 This command does not exist in the original Blitz products. BlitzLLVM adds it.

Converts a number or a text to a Short, a 16-bit integer from -32768 to 32767. This is a BlitzLLVM extension: the originals only know Int and Float. A whole number that is too large keeps its lowest 16 bits, a real is rounded to the nearest whole number (halves go to the even one) and stops at -32768 or 32767 if it is outside. Use SatShort to stop whole numbers at the limits as well.

Differences

  • Not in the originals, which have no integers of other sizes.

Examples

Print Short(1000)
Print Short(40000)
Print Short(100000.0)
1000
-25536
32767

Related Commands

Long 〔BlitzLLVM〕, Object, Single 〔BlitzLLVM〕, UShort 〔BlitzLLVM〕

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally