Node:ShortInt, Next:, Previous:ShortCard, Up:Reference



ShortInt

Synopsis


type
  ShortInt  { built-in type }

Description

ShortInt is a signed integer type which is not larger than Integer. On most platforms it is 16 bits wide and thus has a range of -32768..32767.

ShortInt in GNU Pascal is compatible to short int in GNU C.

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

Conforming to

ShortInt is a Borland Pascal extension. In Borland Pascal, ShortInt is an 8-bit signed integer type (ByteInt in GNU Pascal).

Example


program ShortIntDemo;
var
  a: ShortInt;
begin
  a := 42;
  WriteLn (a)
end.

See also

Integer Types, Subrange Types.