Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hex To ASCII
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01204887
Message ID:
01221885
Views:
11
Going 1 setp further you can convert an Hex value to a decimal
* convert to a decimal value
?ASC(STRCONV('18',16)) &&  24
?ASC(STRCONV('ff',16)) && 255

** Hex numbers in separate groups
* 04 01
?ASC(STRCONV('04',16))+(ASC(STRCONV('01',16))*16^2) && 260

** one large number
* 4E9AC3 
? ASC(STRCONV('c3',16))+(ASC(STRCONV('9a',16))*16^2)+;
 (ASC(STRCONV('4e',16))*16^3) && 39,619

* 30404040 
? ASC(STRCONV('40',16))+(ASC(STRCONV('40',16))*16^2)+;
 (ASC(STRCONV('40',16))*16^3)+(ASC(STRCONV('30',16))*16^4) && 3,424,320
>>Anyone have a routine for converting Hex to ASCII?
>
>VFP version ?
>
>Look
>
>? STRCONV('30404040',16)
>
Previous
Reply
Map
View

Click here to load this message in the networking platform