MaxInt

From Free Pascal wiki
Revision as of 07:41, 13 February 2010 by Rfc1394 (talk | contribs) (new)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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.

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.