Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fraction/Decimal conversions
Message
From
28/12/1998 06:45:45
 
 
To
26/12/1998 16:00:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00170505
Message ID:
00170696
Views:
18
Hi Jim,

I had to do this in an app once. The methods really depend on how the fractions are displayed and stored. Can you give us a clue ?

Of course the fraction to decimal is easy once you can parse the fraction format. Simply divide the numerator by the denominator <g>. (Sorry, I could not resist stating the obvious).

Since not all decimals can be displayed as fractions, you have to have an 'error routine' to handle those.

Another approach... if there are a relatively few combinations you always use, perhaps a conversion table would be the easiest solution.

Hope this helps,

Ken

>Anybody got any code to convert values back and forth between fractions and decimals?
Previous
Reply
Map
View

Click here to load this message in the networking platform