Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hex conversion
Message
 
À
23/09/1998 15:28:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00139908
Message ID:
00140024
Vues:
29
Heya John,

>> CHR(0xHH)
>
>What would be the opposite? By the way, neat!

TRANSFORM(ASC(cChar),"@0")

This would give you a string with the hex representation of cChar, but it returns always a long, eg. 0x00000041. If you need only a byte you can use:

"0x"+RIGHT(TRANSFORM(ASC(cChar),"@0"),2)

And if you want to convert this hex-string into a number again, you can use

EVALUATE(cHexstring)

Christof
--
Christof
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform