Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to extract length,decimal of a numeric field
Message
From
13/03/2000 08:57:15
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvania, United States
 
 
To
10/03/2000 18:12:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00344461
Message ID:
00344937
Views:
18
>Assuming I know the name of a field and if it is numeric or not. With those two values, what would be the best way to extract the length and the decimal value of that field from the field structure?

I don't know about the BEST way, but this is A way:

fval = 3.0021
cfval = allt(strtr(str(y,10,18),"0"," "))
flen = len(cfval) &&includes decimal in count
fdecimal = flen - at(".",cfval)

Is this what you're looking for?
Previous
Reply
Map
View

Click here to load this message in the networking platform