Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TRANSFORM and SET DECIMALS
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01214075
Message ID:
01214311
Views:
6
>I know that much, Naomi! <g>
>
>I was just thinking it seems to be kind of a stupid design decision and was wondering if anyone knew why.
>

Hi Russell,

For this question the answer is simple:
Because the designer, at design moment was stupid
otherwise the design can't to be called stupid.

But this is not the case.

This is not a by design feature, it is an old bug:
clear
SET DECIMALS TO 1
SET FIXED ON
* VFP apply SET FIXED ON perform a ROUND(,1) and apply the TRANSFORM() behavior : Removes trailing zeros 
? TRANSFORM(1.289) && 1.3
SET FIXED OFF
* VFP apply SET FIXED OFF don't perform a ROUND(,1) and apply the TRANSFORM() behavior : Removes trailing zeros 
? TRANSFORM(1.289) && 1.289

SET FIXED ON
* VFP apply SET FIXED ON and perform a ROUND(,1)
* after apply the TRANSFORM() mask
SET FIXED OFF
* BUG: the developer forgot to check SET(FIXED) and
* VFP apply SET FIXED ON and perform a ROUND(,1)
* after apply the TRANSFORM() mask
? TRANSFORM(1.289,"@R 99.####") && 1.3000
WORKAROUND ( but it open other issues ):
SET DECIMALS TO 18
Fabio

>>Well, that's how it is. Re: TRANSFORM() question Thread #1126152 Message #1126159
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform