Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
An non-overflow base converter wanted!
Message
From
09/11/1998 07:28:47
 
 
To
08/11/1998 20:38:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00155612
Message ID:
00155662
Views:
14
>I want to have a base converter for more digits than normal limit!
>
>For example, I want to converter a 64 digit Hexidecimal number into
>a Decimal Number or Inverse convertion, what can I do!?
>
>Suppose the function/procedure will like:
>
>myDecimal = chBase(myHexidecimal, OriginalBase, NewBase)
>
>where myDecimal, myHexidecimal are strings and
>OriginalBase, NewBase are integers.
>
>I donno the method to do!? May C, Basic or other language will do it easier!?

The problem is the internal representation of number - if you in fact need to represent 64 bit integer values, you'll need to use what is in C/C++ a ULARGE, which is a 64 bit integer type not available in VFP or VB AFAIK, stored and manipulated as two DWORDs. I'd suggest looking up "large integer Operation" in the MSDN for more details on ULARGE and the Win32 API functions associated with it.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform