|
-
May 18th, 2000, 04:13 AM
#1
Thread Starter
Lively Member
lets say i need to work iwth integers in the nonillion range (1,000,000,000,000,000,000,000,000,000,000) in a for loop.. has anyone developed a class to handle this sort of thing? i know it doesn't sound realistic to have a for loop that long but i need to use it!
is there anything i can do?
-
May 18th, 2000, 04:15 AM
#2
Thread Starter
Lively Member
darnit wrong forum
can a moderator move this to the general programming foruM?
-
May 18th, 2000, 04:41 AM
#3
Declare it as Double. Integers will only give you around 32,000. Using Double will give you a number somewhat like the one you specified.
Code:
Dim MyValue as Double
[Edited by Megatron on 05-18-2000 at 05:43 PM]
-
May 18th, 2000, 05:41 AM
#4
i have a book (vb6 win32 api tutorial by jason bock, wrox presS)
he uses UDT's to express big numbers, he dunnit like this
Code:
type thisthing
lower32 as long
higher32 as long
that makes it like 64 bits or something.... I am not very sure, the author didnt really say how to use it, he just said something about it.
-
May 18th, 2000, 05:46 AM
#5
-
May 18th, 2000, 05:47 AM
#6
Yes, but you could just type one word and make it 64 bits.
Currency is 64 bits and I think Double is 96 bits.
-
May 18th, 2000, 06:30 AM
#7
Frenzied Member
no, a currency is only 64 bits, Dennis, when Jason Bock uses his LARGE_INTEGER use a currency instead, it makes the maths so much easier.
also, watch for memory leaks in his code, he forgets some deleteobjects etc.
Other than that it's a great book, those of you thinking of buying it, don't be discouraged by the scary picture on the front.
[Edited by Sam Finch on 05-19-2000 at 12:32 AM]
-
May 18th, 2000, 06:45 AM
#8
no, a currency is only 64 bits
Yes, that's what I said, didn't I?
-
May 18th, 2000, 06:50 AM
#9
Frenzied Member
I meant a double is 64 bits, I just forgot what I meant while typing.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|