Difference between revisions of "MaxInt"

From Free Pascal wiki
Jump to navigationJump to search
Line 1: Line 1:
''Maxint'' is a special [[const]] predefined by the compiler which declares the positive [[integer]] with the largest magnitude which the compiler can handle directly.  This typically is the word size for the particular compiler, and varies according to the number of bits the processor for that machine uses.
+
''Maxint'' is a special [[const]] predefined by the compiler which declares the positive [[Integer|integer]] with the largest magnitude which the compiler can handle directly.  This typically is the word size for the particular compiler, and varies according to the number of bits the processor for that machine uses.  Note that maxint is an [[unsigned]] value.
  
 
The typical values of MAXINT are:
 
The typical values of MAXINT are:

Revision as of 21:00, 13 January 2012

Maxint is a special const predefined by the compiler which declares the positive integer with the largest magnitude which the compiler can handle directly. This typically is the word size for the particular compiler, and varies according to the number of bits the processor for that machine uses. Note that maxint is an unsigned value.

The typical values of MAXINT are:

  • 8-bit and 16-bit machines, 2**16-1: 65,535
  • 32-bit machines, 2**32-1: 4,294,967,295
  • 64-bit machines, 2**64-1: 18,446,744,073,709,551,615

Maxint can be overridden with a user-defined value.