Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this not irritating?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01101592
Message ID:
01101647
Views:
10
>There's a way around this, but it's still irritating . . .
>
>
>set decimals to 2
>myvar = 99.999
>? myvar   && Prints 99.999
>? transform(myvar, "999.9999")   && Prints 100.0000
>
This is a bug.

Without parameters TRANSFORM it correctly works.
A side effect is that with a format parameter, you can have ***.**** output !
set decimals to 1
SET FIXED OFF

CLEAR
myvar = 9999.999
? transform(myvar)   && Prints 99.999
? transform(myvar, "@R 9999.9999")   && Prints ****,****
* cause: with a parameter TRANSFORM uses SET DECIMALS
? "this is that that ago VFP before applying the formatting ",TRANSFORM(myvar,"")

* a workaround for this is not simple without a UDF
? TRANSFORM(myvar,"@R 999,999.9999") && wish 9,999.9990
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform