Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LEN() for numeric expresions
Message
From
30/10/2002 11:58:55
 
 
To
30/10/2002 11:45:14
Héctor Lizarraga
Gobierno Del Edo de Querétaro
Querétaro, Mexico
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00716929
Message ID:
00716942
Views:
18
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform