Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hex conversion
Message
 
To
23/09/1998 15:28:49
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00139908
Message ID:
00140024
Views:
28
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
Previous
Reply
Map
View

Click here to load this message in the networking platform