>>>
>>>OK, where'd Craig go? I'm gonna follow him running away screaming! < bg >
>>
>>Matt,
>>
>>Take my advice, ignore him. He loves this kind of attention. Next thing you know, he'll be talking about ether and other chemicals. Me? I blame Ed. He called him out.
>
>Be careful George, remember, in the first year of the UT awards, I got the longest mnemonic. You keep making me laugh like that and I might need to invent a new one that might be < gasp! > vulgar! lol
In that case, Matt, here's something we use around here just for that. Using this, you can be as vulgar as you 0x64616D6E well like:
DEFINE CLASS HexWords AS CUSTOM
FUNCTION WordToHex
LPARAMETER tcWord
LOCAL lni, lnlast, lcresult, lcchar, lnchar
lcresult = ""
lnlast = LEN(tcWord)
FOR lni = 1 TO lnlast
lcchar = SUBSTR(tcWord, lni, 1)
lcresult = lcresult + RIGHT(TRANSFORM(ASC(lcchar), "@0"), 2)
NEXT
lcresult = "0x" + lcresult
RETURN lcresult
ENDFUNC
FUNCTION HexToWord
LPARAMETER tcHex
LOCAL lni, lnlast, lcresult, lcHex, lnchar
lcresult = ""
lcHex = SUBSTR(tcHex, 3)
lnlast = LEN(lcHex)
FOR lni = 1 TO lnlast STEP 2
lnchar = EVALUATE('0x' + SUBSTR(lcHex, lni, 2))
lcresult = lcresult + CHR(lnchar)
NEXT
RETURN lcresult
ENDFUNC
ENDDEFINE
George
Ubi caritas et amor, deus ibi est