Robert Jr Ohannessian wrote:
Hans de Goede wrote:
What the !@#$% MS idiots what were they thinking everyone uses long
== 64 bits on 64 bit archs, so hey lets be microsoft lets do it
different.
Technically, Microsoft's implementation is full C standard compliant.
All you know about 'long' is that:
1) sizeof(long long) >= sizeof(long) >= sizeof(int)
2) LONG_MIN -2147483647 // -(^231 - 1) (maximum value)
LONG_MAX +2147483647 // 2^31 - 1 (minimum value)
Any other assumptions you make is at your own risk. C does not even
guarentee 2's complement representation.
Normal conventions say that sizeof(long) is the largest integer an arch
can represent unless sizeof(int) is larger then that in which case
sizeof(long) == sizeof(int)
See the C standard, second 5.2.4.2.1, 6.2.5 and 6.3.1.1.
'long long' is the only C basic type that requires at least 64-bit of
storage (but not strictly so).
long long is not a C basis type.
Regards,
Hans
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642