Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change to DECIMALS ?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01165727
Message ID:
01165731
Views:
7
>Something odd has happened on my system. Code which worked previously has suddenly changed behaviour.
>
>I had a line of code which equates to this:
>
>? VAL('1.8985')
>returning 1.8985
>
>now it returns 1.90
>
>I've tracked it down to the SET DECIMALS being 2. My regional settings are set to use system settings, which are British. The settings dialogue shows 2 in the decimals.
>
>SET FIXED OFF makes no difference.
>
>I am mystified as to how this has altered unless there is some connection with the UK end of daylight savings change that took place 2 days ago. I find it hard to believe.
>
>This is on VFP8, SP1.
>
>Are there any other UK users having a similar problem or have I done something really stupid? (or both...)
>
>TIA,
>Simon
How about:

? ROUND(1.8985,2)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform