Node:Cardinal, Next:case, Previous:Card, Up:Reference

### Cardinal

#### Synopsis

    type
      Cardinal  { built-in type }

#### Description

`Cardinal` is the "natural" unsigned integer type in GNU Pascal. On most platforms it is 32 bits wide and thus has a range of `0..4294967295`. Use it whenever you need a general-purpose unsigned integer type and don't need to care about compatibility to other Pascal dialects.

`Cardinal` in GNU Pascal is compatible to `unsigned int` in GNU C.

There are lots of other integer types in GPC, see Integer Types.

#### Conforming to

`Cardinal` is not defined in ISO Pascal, but several Pascal compilers support it as an extension. In Borland Delphi, for instance, it is an unsigned 16-bit in version 1.0, an unsigned 31-bit integer from version 2.0 on, and an unsigned 32-bit integer from version 4.0 on.

#### Example

    program CardinalDemo;
    var
      a: Cardinal;
    begin
      a := 42;
      WriteLn (a)
    end.

#### See also

Integer Types, Subrange Types.