Maximum Ints

Blitz3D Forums/Blitz3D Beginners Area/Maximum Ints

_PJ_(Posted 2009) [#1]
Regarding the the (2^31)-1 limitation on integer sizes, would 64-Bit OS and/or CPU be able to handle integers up to (2^63)-1 ?

Sounds like it should be so in theory, is anyone able to try this?


Yasha(Posted 2009) [#2]
If they can, that's one hell of a serious bug. The size of an int should be determined by the language, not by the architecture. Many structures rely heavily on data types being a known size; if ints magically became 64-bit on newer operating systems I'm pretty sure everything would explode in a very horrible way.

EDIT: Also, I forgot - 32-bit hardware can still handle 64-bit integers perfectly happily - go and try it in BlitzMax. It's just not as fast.


_PJ_(Posted 2009) [#3]
Well, it would always be beneficial to account for increases in size, what if a Blitz update suddwenly allowed for larger Ints?
It's why a lot of things like the 'Y3K' bug etc. occur when programers have poor foresight.
But then, of course, we don't live in a perfect world ;) and I do see your point there. I didn't think of that potential so it likely would be a headache for a LOT of people.