Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert string 1/4 or 1/2 to numeric
Message
From
19/01/2016 08:49:13
 
 
To
19/01/2016 01:21:48
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01629854
Message ID:
01629931
Views:
51
>>How would you reverse that, Thomas?
>>e.g. convert .25 to "1/4"
>
>Thats a pain, if it needs to work for any given number. In special if you need it reduced.
>
>I had this problems with distances, but they where all in fractions to the power of 2, so it was relative simple. I can borrow you this ancient code, if you like.

Thank you for the offer, Lutz.

My application carries decimal equivalents of sheet sizes for a printer and has to print them as fractions of inches.
The numbers are all over the lot - 3/16", 5/8", 7/16", etc.
(you folks don't have that problem, do you?)
I solved it by dividing by 2 till I had something I could use.
A built in function would have been handy.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform