[fpc-pascal] History of the Cardinal data type?

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Wed Mar 30 10:37:36 CEST 2016

On 2016-03-30 02:24, Dmitry Boyarintsev wrote:
> Does, it also make the code less high-level?

In my case I'm specifically referring to the benefit of using (U)Int<x>
style data types for use in record structures when reading binary data
files. In this case, no matter the platform, the data structures must
stay a set size.

For any other general coding and variables I use Object Pascal types
like Integer.

> At that time word size might vary dramatically from system to system   (
> https://en.wikipedia.org/wiki/Word_(computer_architecture) )

Interesting. I never knew Word was platform dependant. I see even for
ARMv1, ARMv6 and ARMv8 the size of Word changes.

Does FPC follow that platform rule, or does FPC always define Word as
16-bits? [sorry I don't have a ARM device to test on at the moment]
If Word size does changes in FPC (for example between x86 & ARMv6), then
I have quite a bit of code to fix up.

  - Graeme -

More information about the fpc-pascal mailing list