Qbasicnews.com
64 Bit's in QB? - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: General (http://qbasicnews.com/newforum/forum-6.html)
+--- Forum: General/Misc (http://qbasicnews.com/newforum/forum-18.html)
+--- Thread: 64 Bit's in QB? (/thread-3167.html)

Pages: 1 2 3 4


64 Bit's in QB? - Z!re - 02-10-2004

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?


64 Bit's in QB? - na_th_an - 02-10-2004

It's easy. Use strings. Or use two LONGs for each 64 bits integer. Or ask Neo Wink


64 Bit's in QB? - Zack - 02-10-2004

Yes, the latter option I think is the best. Smile


64 Bit's in QB? - TheBigBasicQ - 02-11-2004

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.


64 Bit's in QB? - Z!re - 02-11-2004

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)


64 Bit's in QB? - Agamemnus - 02-11-2004

.......QB4.5's DOS is 16bit.


64 Bit's in QB? - Z!re - 02-11-2004

So there is absolutely no way to get 64bits in qb?

No workaround using ASM or anything?


64 Bit's in QB? - oracle - 02-11-2004

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...


64 Bit's in QB? - Z!re - 02-11-2004

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:


64 Bit's in QB? - na_th_an - 02-11-2004

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