[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 9.125 Integer

### Synopsis

    type
      Integer  { built-in type }

or

    type
      Integer (n)  { built-in type class }

### Description

``Integer'` is the "natural" signed integer type in GNU Pascal. On most platforms it is 32 bits wide and thus has a range of ``-2147483648 .. 2147483647'`. Use it whenever you need a general-purpose signed integer type.

As an extension, GPC allows to use ``Integer'` as a pseudo-schema to produce types with a specified size in bits; for example

    type
      Int16 = Integer (16);

defines an integer type with 16 bits. The same mechanism works for ``Cardinal'` and ``Word'`, too.

``Integer'` in GNU Pascal is compatible to ``Int'` in GNU C.

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

### Conforming to

In ISO Pascal, ``Integer'` is the only built-in integer type. (However see section 8.2.10.1 Subrange Types.)

### Example

    program IntegerDemo;
    var
      a: Integer;
    begin
      a := 42;
      WriteLn (a)
    end.

### See also

section 8.2.3 Integer Types, section 8.2.10.1 Subrange Types.

This document was generated by Frank Heckenbach on May, 10 2002 using texi2html