Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing numbers like 1/3
Message
From
26/09/2006 09:11:38
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01157137
Message ID:
01157219
Views:
19
>What's the best way to store numbers like 2/3, but in situations where you
>do not want to do any rounding at all. Do you store 2/3 as a string?

If you mean to store general fractions, I agree with Fabio, best thing to do is to store two integers. Maybe add some code to divide both with the largest common divider first. You may even write some code to do basic integer arithmetic with them - adding and multiplication. Depends on what do you want to do with them down the road.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform