Int32

From Free Pascal wiki

Deutsch (de) English (en) français (fr)


Back to data types.


Range of values: -2147483648 .. 2147483647

Memory requirement: 4 bytes or 32 bits

A data field of the Int32 data type can only take integer values ​​with and without sign. Assigning other values ​​leads to compiler error messages when the program is compiled and the compilation process is aborted. That is, the executable program is not created.

Definition of a data field of type Int32:

  var 
    i32 : int32;

Examples of assigning valid values:

    i32 := -2147483648;
    i32 := 0;
    i32 := 2147483647;

Examples of assigning invalid values:

    i32 := '-2147483648';
    i32 := '0';
    i32 := '2147483647';

The difference between the two examples is that the upper example is the assignment of literals of the type Integer, while the assignment of the lower example is literals of the type String.