Max Integer Value

BlitzPlus Forums/BlitzPlus Beginners Area/Max Integer Value

Why is the max integer value in Blitz, 2147483647 - FF FF FF 7F?
Why not the actual maximum, 4294967295 - FF FF FF FF?

I'm writing a utility which does massive file writing, but of course - Blitz has slow disk access. So, to speed it up, I tried writing INTs instead of BYTEs, in groups of 4. And yes, this does speed it up by a factor of 4, but it means half the INTs I can't store - let alone write. For instance, to write AA AA AA AA, you need the INT value of 2863311530 - too high for Blitz. :\

Is there a workaround for storing large INTs?

+BlackD

INT's are also negative.

-2147483648 to +2147483647

Actually, -2147483648 to +2147483647. =)

That's what I said! ;)

I better get my eyes checked ;)

lol..
Our high school computing teacher messed that one up, only on a much easier scale:
eg:
-127 to +128 for a negative byte: NOOOO!

she also wrote 1000 000 as being negative 1 as out first example for two's complement as well.

The subjects ridiculus, and its not taught any better.
does BlitzMax have the option for +ve ints?

Joy, and no way to unsign either...looks like it is time to take some of the skill you learned in Blitz and read a C++ manual. You will find they are practically cousins.

Spirit


does BlitzMax have the option for +ve ints?


BlitzMax caters for 64bit (Long) integers and (Double) floats:

32 bit signed integer (Int): -2^31 to +2^31-1
64 bit signed integer (Long): -2^63 to +2^63-1

So you could feasibly have 32bit unsigned integers by converting to positive 64bit long integers.