An Integer type supporting values from -32768 to 32767 System unit
type SmallInt = -32768..32767;
The SmallInt type is a 16 bit sized signed Integer.
To hold larger integers, use the Integer , LongInt (both 32 bits) or the Int64 (64 bits) types.
Related commands
ByteAn integer type supporting values 0 to 255
CardinalThe basic unsigned integer type
Int64A 64 bit sized integer - the largest in Delphi
IntegerThe basic Integer type
LongIntAn Integer whose size is guaranteed to be 32 bits
LongWordA 32 bit unsigned integer
ShortIntAn integer type supporting values -128 to 127
WordAn integer type supporting values 0 to 65535
 Download this web site as a Windows program.

Example code : Showing the capacity of SmallInt
  min, max : SmallInt;
  // Set the minimum and maximum values of this data type
  min := Low(SmallInt);
  max := High(SmallInt);
  ShowMessage('Min smallint value = '+IntToStr(min));
  ShowMessage('Max smallint value = '+IntToStr(max));

Show full unit code
  Min smallint value = -32767
  Max smallint value = 32768
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page