[fpc-devel] New language idea: Unified types(assignmentsize-compatible types).
DrDiettrich1 at aol.com
Sun Jun 26 14:03:20 CEST 2011
Graeme Geldenhuys schrieb:
> On 21 June 2011 13:09, Hans-Peter Diettrich <DrDiettrich1 at aol.com> 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.
It *happens* to have 32 bit there. On 16 bit platforms (TP, Delphi 1) it
was 16 bit. I'm not sure when Delphi changed that to 32 bit, perhaps not
> 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.
In Delphi (XE) NativeInt has the CPU register size, assuming that data
and address registers have the same size (i.e. unsegmented pointers).
LongWord still is documented as a fundamental (non-generic) 32 bit type.
More information about the fpc-devel