Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Storing numbers like 1/3
Message
De
26/09/2006 09:11:38
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01157137
Message ID:
01157219
Vues:
20
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform