Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Decimal to hexadecimal conversion functions
Message
From
24/01/2001 15:05:14
Mike Mattos
Nationwide Computers
Mississauga, Ontario, Canada
 
 
To
24/01/2001 14:07:13
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00464326
Message ID:
00468165
Views:
34
You can translate numbers from decimal to hex easily enough with a lookup table!

n="62345"

essentially you find the largest value in your table less than n

example F000 = 61440

subtract that number from n, and look up the remainder

62345 -61440 = 905

example 0300 = 769


Using string manipulation, you figure out that n is F3xx


the table doesn't need 64000 entries, 64 is about enough for 4 char hex
Previous
Reply
Map
View

Click here to load this message in the networking platform