DelphiBasics
Integer
Type
The basic Integer type System unit
type Integer = -2147483648..2147483647; // At the time of writing
Description
The Integer type is an Integer whose size is not guaranteed. It is the basic integer type in Delphi, and currently has the same capacity as the LongInt type - 1 bit sign, and 31 bits value.
 
To hold very large integers, use the Int64 type.
Related commands
ByteAn integer type supporting values 0 to 255
CardinalThe basic unsigned integer type
Int64A 64 bit sized integer - the largest in Delphi
LongIntAn Integer whose size is guaranteed to be 32 bits
LongWordA 32 bit unsigned integer
ShortIntAn integer type supporting values -128 to 127
SmallIntAn Integer type supporting values from -32768 to 32767
WordAn integer type supporting values 0 to 65535
 Download this web site as a Windows program.




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

Show full unit code
  Min integer value = -2147483648
  Max integer value = 2147483647
 
Delphi Programming © Neil Moffatt 2002 - 2022. All rights reserved.  |  Home Page