Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculate any decimal points
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00782716
Message ID:
00782725
Views:
14
This message has been marked as the solution to the initial question of the thread.
Hi Ali,

The result returned by VAL() function isn't affected by SET DECIMAL setting. So, Val("89.335") will always return 89.335. The display of numeric values is affected by SET DECIMAL command.

>Hi Everybody,
>
>I want to calculate the numeric value of a string with any decimal points. The problem with Val() is: I have to use Set Decimal To for a specific number of decimal points.
>
>For example.
>If Set Decimal to 2
>Val(“89.335”) yields 8.34
>and if Set Decimal to 2
>Val((“89.335”) yields 8.335
>
>Is there any solution?
>
>Thanks,
>Ali
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform