[fpc-devel] New language idea: Unified types(assignmentsize-compatible types).
DrDiettrich1 at aol.com
Tue Jun 21 13:09:36 CEST 2011
Skybuck Flying schrieb:
> Not really, because if the platform changes from 32 bit to 64 bit then
> other types would change too.
> For example type declared as being longword would change to uint64.
Please understand generic types first.
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.
BTW I don't know of *any* language that changed "long" integers to 64
bits on 64 bit platforms.
Since C has absolutely *no* idea of fixed-size integers, all concrete
types are subject to conditional definitions in the header files:
typedef int32 int;
typedef int16 int;
typedef ptr_int int32;
typedef ptr_int int64; //hope that an int64 type has been found out
More information about the fpc-devel