Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Decimal to hexadecimal
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00402852
Message ID:
00403193
Views:
12
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform