Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ho do I convert decimal to hex with a twist?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00123780
Message ID:
00123806
Views:
17
Roxanne,

Sorry, I thought you wanted to throw away the decimals. Hex is most often used for just integers. The function that converts floating point numbers to the hex internal storage binary format is a lot more complex. I'd probably write it as a VC++ DLL that would take a float argument and an 8 byte buffer and convert between the two.

Why don't you want to store it as a N, F or B field?

>>Just ? transform( INT( x ), "@0" )
>
>Hi David,
>
>That still gives me a result of 0x0000000A. We're looking for a way to convert a numeric value with decimal places to a value we can store in a non-numeric field. Thing is though the decimal places mean something in our scenario. And I take it hex is the wrong way to go since it only uses integers. Any other thoughts?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform