General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only