This looks really good:
cResult = iif( bitt( inAsc, 7), "1", "0") + iif( bitt( inAsc, 6), "1", "0") +...
It is the fastest too, here are the test times for 10000 calls:
0.123 sec - bittest method
0.247 sec - the substr("000000010...",4*eval('0x'+subs(tran(6... parsing
0.286 sec - API call (_itoa in MsvCrt)
1.3 sec - present UDF
Thanks a lot!
dz
PS Isn't this another case of reading the docs for somebody else?
Doru