[fpc-pascal] 32 to 64 bits

Jürgen Hestermann juergen.hestermann at gmx.de
Sat Jan 10 16:14:34 CET 2009

>> "The cardinal type is currently always mapped to the longword type.
>> The definition of the cardinal and integer types may change from one
>> architecture to another and from one compiler mode to another."
>> "Always" or "may change" ? :-?
> Current always, but may change ? Perfect English. Now so, but not guaranteed
> to last forever. This pegging is mostly for Delphi compatibility (and then
> specially the Windows headers). If you don't have that, it doesn't matter so
> much.

Because of these weak definition of types (which is very confusing IMO) 
I often use a check in the implementation part of units if I have to 
reliy on sizes:

if sizeof(Word)<>2    then Halt(9000);
if sizeof(DWord)<>4   then Halt(9001);
if sizeof(LongInt)<>4 then Halt(9002);

Then I am at least warned in case my presumption are no longer valid.

Jürgen Hestermann.

More information about the fpc-pascal mailing list