Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LEN() for numeric expresions
Message
De
30/10/2002 11:58:55
 
 
À
30/10/2002 11:45:14
Héctor Lizarraga
Gobierno Del Edo de Querétaro
Querétaro, Mexique
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00716929
Message ID:
00716942
Vues:
23
Héctor,

Thats a tricky question. For example:
x = 456.4618
x = x + .0002
? x   && x = 456.4620  this is still 4 decimals
I don't really see how it can be done, because the x in the above example is accurate to the ten-thousandths position. Any attempt to use a function such as MOD() or TRANSFORM() to determine the precision would indicate that it is only accurate to the thousandths position.

Of course determining the length to the left of the decimal is a piece of cake.

I'm curious...what do you need this information for?

>Hi, I need to make a function wich returns the lenght of a numeric expresion. Lets say that I have a number, 456.4618 and I want to know how many integers and decimals positions there are. This function must return that there are 3 integers and 4 decimals.
>
>Any idea?
>
>Thanks
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform