DelphiBasics
SmallInt
Type
An Integer type supporting values from -32768 to 32767 System unit
  type SmallInt = -32768..32767;
Description
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
Byte An integer type supporting values 0 to 255
Cardinal The basic unsigned integer type
Int64 A 64 bit sized integer - the largest in Delphi
Integer The basic Integer type
LongInt An Integer whose size is guaranteed to be 32 bits
LongWord A 32 bit unsigned integer
ShortInt An integer type supporting values -128 to 127
Word An integer type supporting values 0 to 65535
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 Download this web site as a Windows program.


 
Example code : Showing the capacity of SmallInt
var
  min, max : SmallInt;
begin
  // 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));
end;

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