Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
64 Bit's in QB?
Would it be impossible to write a 64bit (or higher?) library for QB?

All the basic math functions like +-*/^ aso. and some of the basic QB functions: STR$(), HEX$() aso.

And if it is impossible, why?

I can't do it myself, but wouldn't it break a lot of barriers?
It's easy. Use strings. Or use two LONGs for each 64 bits integer. Or ask Neo Wink
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
Yes, the latter option I think is the best. Smile
f only life let you press CTRL-Z.
Freebasic is like QB, except it doesn't suck.
Havent you asked this question twice before?

Nath, strings would be slow. Two longs seem to be a better option. Too bad we cant just make a 64bit data type =P.
I've asked it once before and everyone ignored it :wink:

I am in fact looking for a new data type (if it can't be done, pleae tell why)
.......QB4.5's DOS is 16bit.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit to see rubbish in all its finest.
So there is absolutely no way to get 64bits in qb?

No workaround using ASM or anything?
Like na_th said: use strings, or many longs etc etc.

BIGINT is a library for QB that enables you to calculate numbers that are up to string length long (while testing it I calculated 3000! (factorial)). I suppose in the same way you could recode the common qb functions...
Using 2 longs, how do I do multiplication? or division? or even addition?

Using strings, how do I get it to not take 2sec per operation?

I am talking about numbers greater than long here, using a 64bit var to store 5 and add 5 to it is not what I want

I'm looking for something to handle numbers of 10GB and up, see my problem?

And before anyone say it, NO I don't wanna use another programming language.

I just want to know if it can be done, without using slow string conversions.

And if it can be done, links? examples? anything? please *begs* :lol:
You have to write functions to handle additions and multiplications and stuff. There are plenty of algos you can follow, the easiest way is following the algo you use to add or multiply on paper.

TBBQ: Even using two LONGs, strings are necessary 'cause in QB longs are signed so you have 1 bit sign + 31 bits. To make the less significant long unsigned you have to do some turnarounds that may include CVL, MKL$ and/or HEX$. Sad
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians

Forum Jump:

Users browsing this thread: 1 Guest(s)