Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert string to Hexadecimal in VFP7
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Divers
Thread ID:
01184100
Message ID:
01184112
Vues:
22
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform