Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TRANFORM() Behavior ... changed from SP1 ???
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00616533
Message ID:
00616708
Views:
33
Hi George,

So, it's not the function that's wrong then, but the help? here is the help in vfp7 on transform:

Trailing zeros are removed from the decimal portion of a numeric value. If the numeric value is a whole number, a decimal point is not included in the transformed value (for example, 4.0 is transformed to 4). If the numeric value is less than one but greater than negative one, zero is included before the decimal point (for example, .4 is transformed to 0.4).

??
tracy


>>>>>I think this is by design. Try
? TRANSFORM(10.2) && Displays 10.2
>>>>>? TRANSFORM(10.20) && Displays 10.20
>>>>>SET DECIMALS TO 1
>>>>>? TRANSFORM(10.20) && Displays 10.20
>>>>
>>>>
>>>>It's not by design because it doesn't work this way in VFP 6. Try in VFP 6.
? TRANSFORM(10.2) && Displays 10.2
>>>>? TRANSFORM(10.20) && Displays 10.2
>>>>SET DECIMALS TO 1
>>>>? TRANSFORM(10.20) && Displays 10.2
The VFP 6/7 help also states that "Trailing zeros are removed from the decimal portion of a numeric value".
>>>
>>>What I'm saying, Sergey, is that the change was by design in 7.0. What it did in 6.0 is different.
>>
>>Where this change to design is documented?
>
>It isn't. However, it is so different than the previous behavior, that I would have to presume it was done by design. I'll have to check my home box to see if the behavior was the same as 6.0's since I don't have access to 7.0 without SP1 here.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform