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)]
Printable View
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)]
I have no idea myself, but I was wondering what you are doing with such a large number?
Well, Windows Calculator seems to be able to do it, and I'm wondering how.
A Decimal should be able to hold that value.
Nope, it still produces an overflow error.
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
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. =|