Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding the decimal
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00144345
Message ID:
00144415
Views:
30
>Hi George,
>As we added in our letter, we are trying to avoid the afields() function due to the situation that we are in. Any other ideas come to mind??
>
>Sandy


If you use the PADR function with the numeric value to a length longer than you expect, you can then find out the # of decimal places by trimming off the trailing blanks and doing a RAT to locate the decimal point in relation to the length of the string.

nVal = 1.2345
cVal = ALLTRIM(PADR(nVal,10))
nDec = LEN(cVal)-RAT('.',cVAL)
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform