`Word' data type
Fri, 13 Jun 1997 17:24:09 +0200 (MET DST)
Hello, everybody!
I noticed a lot of confusion about Integer types in GNU Pascal.
As I wrote in "info -f gpc -n Integer", these are
bits signed unsigned C equivalent
8 ByteInt Byte [unsigned|signed] char
16 ShortInt ShortWord [unsigned] short
32 Integer Word [unsigned] int == long
64 LongInt LongWord [unsigned] long long
(BTW: The number of bits is the same on all platforms, isn't it?)
I was told more than once that `Word' should have 16 bits (like in
Borland Pascal). I made it 32 bits because this is the "natural"
size on a 32-bit system (like GPC), and it has the same size as
`Integer' (like in Borland Pascal;-).
AFAIK, a "word" is defined to be the "natural" unit of the computer,
but maybe this definition has changed since I have learned it. If the
definition of a word is indeed "16 bits" now, I should change GPC's
behaviour. In this case I would appreciate suggestions how to rename
all GPC Integer types above (which I wouldn't like to do because I find
the above quite consistent).
Greetings,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
maintainer GNU Pascal [970510] - http://home.pages.de/~gnu-pascal/ [970125]
Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)
HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada -
Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es