Node:Word, Next:, Previous:with, Up:Reference



Word

Synopsis


type
  Word = Cardinal;

Description

Word 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. It is the same as Cardinal, introduced for compatibility with other Pascal compilers.

Word 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

ISO Pascal does not define Cardinal. (However see Subrange Types.)

The Word type appears in Borland Pascal and Delphi, too, where it is a 16-bit unsigned integer type.

Example


program WordDemo;
var
  a: Word;
begin
  a := 42;
  WriteLn (a)
end.

See also

Integer Types, Subrange Types.