Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Decimal to hexadecimal conversion functions
Message
De
24/01/2001 15:05:14
Mike Mattos
Nationwide Computers
Mississauga, Ontario, Canada
 
 
À
24/01/2001 14:07:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00464326
Message ID:
00468165
Vues:
33
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform