Bigger Integers in Blitz

Blitz3D Forums/Blitz3D Programming/Bigger Integers in Blitz

SytzeZ(Posted 2008) [#1]
I tansformed Kev's lib for Registry from B+ to B3D code.
It uses ID numbers for the Registry modules (eg. HKEY_CURRENT_USER=$80000001), but Blitz3D doens't support such big numbers, so it changes them to negative numbers.
Is there a way to get bigger integers in Blitz3D?


Bobysait(Posted 2008) [#2]
i remember a dll to use Double integer... check the Code archive area


Floyd(Posted 2008) [#3]
Does it matter if Blitz thinks the numbers are negative?

That code is for BlitzPlus, which uses the same integers as Blitz3D.


_33(Posted 2008) [#4]
I'm sorry but a 32bit INT is very valid in Blitz3D. What you see is a hex value $80000001. Hex values in 32bit goes from 00000000 to FFFFFFFF. I would be careful with that stuff. if you have trouble interpreting hex values and 32 bit ints, I wouldn't even try converting a lib that plays with the registry! Playing with the registry is very complex and you can corrupt it, meaning you could break your windows installation.


Gabriel(Posted 2008) [#5]
Floyd is right. It doesn't matter what B3D thinks the number is. It's only a 32 bit value that you're trying to hold and you've got 32 bits to store it in. If it worked in BlitzPlus, it'll work in B3D.


boomboom(Posted 2008) [#6]
If you need anything bigger you could store it in a bank


Charrua(Posted 2008) [#7]
Hi

try:

anInteger = $80000001

Print anInteger

Print Hex(anInteger)

WaitKey()


you'll see that the variable holds the correct value

hope that help's you

Juan


Ross C(Posted 2008) [#8]
Or use a string to load the number. Pretty slow though, as i found out :o)