>Thank you Gregory,
>but it's in vfp6, so I can't use strconv() function.
Here are the vfp6 counterparts then
function ath(x)
local out, i
out = ''
for i = 1 to len(m.x)
out = m.out + right(transform(asc(substr(m.x,m.i,1)),'@0'),2)
endfor
return out
endfunc
function hta(s)
local i, out
store '' to out
for i = 1 to len(m.s)-5 step 6
store m.out + right(bintoc(val('0x' + substr(m.s, m.i, 6))),3) to out
endfor
if( !empty(mod(len(m.s), 6)) )
store m.out + right(bintoc(val('0x' + right(m.s, mod(len(m.s), 6)))),mod(len(m.s), 6)/2) to out
endif
return m.out
endfunc
Gregory