-
May 12th, 2013, 03:37 AM
#1
Calculating with very large numbers
Hi,
I have to calculate the controlnumber in an IBAN bank account number.
First i have to change the a part of the account numer to a string with only 0 to 9
This is what is should be:
Dim Amount1 as ???
dim Amount2 as ???
dim amount3 as ???
dim Temp as string
I do have the string, say temp ="271011240123456789232100"
Then i have to do:
Amount1 = temp / 97 The result must be 2793930310551100919918,5567010309278351
Amount2 must be the decimals from amount1
Amount2 = 0,5567010309278351
Then amount3 = amount2 * 97 Result wil be 54
Then 98 - amount3 (54) = 44
(98 is a fix numer)
44 then is the controlnumber
How to do this in VB6
Herman
-
May 12th, 2013, 11:47 AM
#2
Re: Calculating with very large numbers
I don't think you can use VB6 with 271011240123456789232100 as it will overflow
-
May 12th, 2013, 03:56 PM
#3
Re: Calculating with very large numbers
If you use a double it will not result in an overflow but I doubt that you will be able to get that level of precision on such a large number
Always use [code][/code] tags when posting code.
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
|