Node:Summary of Integer Types, Previous:Integer Types and Compatibility, Up:Integer Types
Here is a summary of all integer types defined in GPC. The sizes and ranges are only typical values, valid on some, but not all platforms. Compatibility to GNU C however is guaranteed.
-128..128, signed char in GNU C.
0..255, unsigned char in GNU C.
-32768..32767, short int in GNU C.
0..65535, unsigned short int in GNU C.
-2147483648..2147483647, int in GNU C.
0..4294967295, unsigned int in GNU C.
-2147483648..2147483647, long int in GNU C.
0..4294967295, unsigned long int in GNU C.
-9223372036854775808..9223372036854775807, long long int in GNU C.
0..18446744073709551615, unsigned long long int in GNU C.
-9223372036854775808..9223372036854775807.
0..18446744073709551615.
-9223372036854775808..9223372036854775807.
-32768..32767.
To specify the number of bits definitely, use type attributes,
attribute.
program IntegerTypesDemo (Output); var ByteVar: Byte; ShortIntVar: ShortInt; Foo: MedCard; Big: LongestInt; begin ShortIntVar := 1000; Big := MaxInt * ShortIntVar; ByteVar := 127; Foo := 16#deadbeef end.
See also: Subrange Types.