integer sizes
Jarrett Billingsley
kb3ctd2 at yahoo.com
Mon May 28 12:10:04 PDT 2007
"Jason House" <jason.james.house at gmail.com> wrote in message
news:f3f139$1hb8$1 at digitalmars.com...
> When I read http://www.digitalmars.com/d/portability.html, I see what I
> started with in this e-mail is wrong. Integral sizes could be increased.
> Does that mean sizeof(int) and sizeof(long) will ever match? Or does that
> mean that if sizeof(int) increases, so will long and cent? I don't know
> about others, but having sizeof(cent) != 128 seems really strange, even if
> it is a hypothetical feature.
I think the integer type sizes are fixed -- int will always be 32 bits etc.
I think what that page is referring to is if you are to write your code
using some kind of alias, like size_t, make sure you don't depend upon its
properties on one platform.
Of course, this could also be a vestige from an ancient incarnation of D
when integer sizes weren't fixed.
More information about the Digitalmars-d-learn
mailing list