[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
type Integer { built-in type } |
type Integer (n) { built-in type class } |
`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.
In ISO Pascal, `Integer' is the only built-in integer type. (However see section 8.2.10.1 Subrange Types.)
program IntegerDemo; var a: Integer; begin a := 42; WriteLn (a) end. |
section 8.2.3 Integer Types, section 8.2.10.1 Subrange Types.