I have a program here which was working fine in Delphi 3 that I compiled and tested on Turbo Delphi 2006 and found a problem. The problem is this: I was using "cardinal" data types as an index for something. It worked in Delphi 3, but I found values were greater than they should be in the Turbo Delphi 2006 compiled version by about 128-256 or so depending on the specific data. Changing these data types to "longint" fixed the problem so the program worked correctly with both compilers.
The question: Why is this?
My understanding was that Cardinal data types were just typical unsigned integer data. This is consistent with the application of them in this program, especially proved by the fact that the Delphi 3 compilation worked correctly. So why did the Turbo Delphi 2006 compilation not work?