Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rounding of decimal places
Message
De
15/11/2003 09:03:53
 
 
À
15/11/2003 07:51:13
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00842819
Message ID:
00850226
Vues:
15
Hi Hilmar,

>That, I think, is a pity. There are situations where exact data - and not only "almost exact" - is required.

>Other programming languages do this, for instance, with BCD.

On a general porpouse language ( C,Java,VB,... ) i can accept this, but on a Database Language the
first two data type to implement completely are:

- fixed decimal numbers
- fixed lenght string


On VFP a numeric variable have a format, but it is hidden ( no function exist for get it ),
then i think this behaviour is useful only for a little context routine, and only for the time of this
information still on developer mind;
everybody use TRANSFORM(),STR(),ROUND() for fix a specific format, also if this format is within the
variable.

When somebody use N() fields the confusion go up to the stars.

I not known well original Fox2.X, but i not think it use float variable for accumulate a SUM command.

>I am starting to learn Java, and see that it has classes for arbitrary precision math. Looks interesting, but I want to learn the basics first.

Arbitrary precision is useful for math pure computation or simulation of theoric models, and is slow and
can to be stored on various binary pattern.

It would be enough me that VFP makes what do SQL Server for the decimal format, until 20 digits.

Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform