[fpc-devel] "Ordinal expression expected" awkwardness

Bart bartjunk64 at gmail.com
Thu Jul 20 10:10:30 CEST 2023

On Thu, Jul 20, 2023 at 7:59 AM Sven Barth via fpc-devel
<fpc-devel at lists.freepascal.org> wrote:

> It is indeed by design that not every integer type is a suitable index variable for a for-loop. In this case that a 64-bit variable can't be used on a platform with less than 64-bit width. The same is probably also true for 32-bit variables on platforms with less width (e.g. i8086, AVR, Z80).

The errormessage suggest that a 64-bit integer variable is not an
ordinal in a 32-bit environment, which is a bit odd.
The first time I encountered this, I stared at it wondering what went wrong.
(Once you know, it's easy...)


More information about the fpc-devel mailing list