|
-
Mar 6th, 2003, 07:01 AM
#1
Thread Starter
Junior Member
ZettaByte Data Type?
What data type would be used to handle such a large number?
I've tried all, even 'Object', yet it still shows an overflow error.
[Edited to add: a ZettaByte = 1180591620717411303424 (1024 ^ 7)]
The arrow shot by the archer may, or may not, kill a single person. However, stratagems devised by a wise man, can kill even babes in the womb.
-
Mar 6th, 2003, 10:26 AM
#2
PowerPoster
I have no idea myself, but I was wondering what you are doing with such a large number?
-
Mar 7th, 2003, 03:52 AM
#3
Thread Starter
Junior Member
Well, Windows Calculator seems to be able to do it, and I'm wondering how.
The arrow shot by the archer may, or may not, kill a single person. However, stratagems devised by a wise man, can kill even babes in the womb.
-
Mar 7th, 2003, 04:44 AM
#4
A Decimal should be able to hold that value.
-
Mar 7th, 2003, 04:59 AM
#5
Thread Starter
Junior Member
Nope, it still produces an overflow error.
The arrow shot by the archer may, or may not, kill a single person. However, stratagems devised by a wise man, can kill even babes in the womb.
-
Mar 7th, 2003, 05:11 AM
#6
A Decimal should be able to do it.
The Decimal value type represents decimal numbers ranging from positive 79,228,162,514,264,337,593,543,950,335 to negative 79,228,162,514,264,337,593,543,950,335.
Possibly the overflow occurs before you assign the value to the variable.
How do you assign the value? Do you use a calculation?
Which way do you use?
MyZettabyte = 1024 ^ 7
or
MyZettabyte = 1180591620717411303424
You could try something like:
MyZettabyte = CType(1024, Decimal) ^ 7
-
Mar 7th, 2003, 06:58 AM
#7
Thread Starter
Junior Member
This works:
VB Code:
Dim Zetta as decimal
Zetta = CDec(1180591620717411303424)
I'm not really using it for _anything_ - it's just one of those 'I-need-to-know-why' things, really. =|
The arrow shot by the archer may, or may not, kill a single person. However, stratagems devised by a wise man, can kill even babes in the womb.
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
|