Besides byte, word, Cardinal, and integer, the integer types of Delphi include:
Longint, longword, shortint, smallint, int64
Among them, longint is equivalent to integer; longword is equivalent to Cardinal. There are three types as follows:
Optional int, smallint, int64
// The occurrence Int Is A 1-byte (8-bit) signed integer var I: Occurrence int; begin // The maximum value is: 011111112 ASM mov I, 01111111b end; showmessage (inttostr (I); {127} // the minimum value is: 100000002 ASM mov I, 0000000b end; showmessage (inttostr (I); {-128} end;
// Smallint is a two-byte (16-bit) signed integer var I: smallint; begin // its maximum value is: 01111111 111111112 ASM mov I, 0111111111111111b end; showmessage (inttostr (I); {32767} // the minimum value is: 10000000 000000002 ASM mov I, too many else 000b end; showmessage (inttostr (I); {-32768} end;
// Int64 is 8 bytes (64-bit). I cannot test it for the moment.