Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert string to Hexadecimal in VFP7
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
Miscellaneous
Thread ID:
01184100
Message ID:
01184112
Views:
20
This message has been marked as the solution to the initial question of the thread.
This parametr hase VFP 8 or VFP9.0
lcStart="AAAA"
lcxx=STRCOVN_15(lcStart)
?lcStart,lcxx,STRCOVN_16(lcxx)

PROCEDURE STRCOVN_15(lcString)
LOCAL lcRet,lii
lcRet=""
FOR lii=1 TO LEN(lcString)
    lcRet=lcRet+RIGHT(TRANSFORM(ASC(SUBSTR(lcString,lii,1)),"@0"),2)
NEXT

RETURN lcRet


PROCEDURE STRCOVN_16(lcString)
LOCAL lcRet,lii
lcRet=""
FOR lii=1 TO LEN(lcString) STEP 2
    lcRet=lcRet+CHR(EVALUATE("0x"+SUBSTR(lcString,lii,2)))
NEXT

RETURN lcRet
MartiJ

>Hi
>How can i convert a string to Hexadecimal using VFP7, where the strconv() function still does not have the 15 option for hexa?
>Jaime
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Reply
Map
View

Click here to load this message in the networking platform