On 26.06.2011 09:49, Graeme Geldenhuys wrote:
On 21 June 2011 13:09, Hans-Peter Diettrich<[email protected]> wrote:
A LongWord will always have 32 bits, because it's a concrete type. Instead
Integer, Cardinal, Char, String or Real can vary with every compiler version
or target platform, because these are *generic* types.
Um, I think you are mistaken. Integer is *always* 32-bits on either
32-bit or 64-bit target platforms. NativeInt is different sizes on
different target platforms. I think LongWord also varies in size based
on target platform, though not 100% sure on this one.
No, LongWord does not vary. It's always 32-Bit.
But Hans-Peter is right so far that Integer was originally considered a
generic type. You can still see this if you do a "SizeOf(Integer)" once
in mode FPC (2 bytes) and in mode ObjFPC (4 bytes). I didn't test
"SizeOf(Cardinal)" in mode FPC yet though...
Regards,
Sven
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel