In our previous episode, African Wild Dog said: > Which integer types have their size dependent on platform? > E.g. in Delphi, LongInt can 32 or 64 bits depending on the platform.
In Delphi they retroactively equated longint to C long, being 32-bit on 64-bits windows and 64-bit on Linux. The Delphi Linux compiler is btw a different compiler than windows. On FPC it is always 32-bit. Ptrint and ptruint scale with pointer size, and integer depends on compilation mode, 16 or 32-bit. For the C compiler that FPC corresponds with (usually gcc), there are types that correspond with C types in unit ctypes. Maybe some of the new ultra small targets like AVR make exceptions, but those are the general rules. > On AVR this is 8-bit. ", but it is not clear about which integer types are > "natives". The typical pascal solution is to use subranges and hope the compiler will optimize it. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal