Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TRANFORM() Behavior ... changed from SP1 ???
Message
From
07/02/2002 10:56:29
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00616533
Message ID:
00616661
Views:
27
>>>>>>I have this common lines:
>>>>>>
>>>>>>CREATE CURSOR test(Num NUMERIC(10,2))
>>>>>>APPEND BLANK
>>>>>>REPLACE Num WITH 10.2
>>>>>>
>>>>>>
>>>>>>In VFP 6.0 if i issue this command:
>>>>>>? TRAN(Num) i have this result 10.2
>>>>>>
>>>>>>In VFP 7.0 SP1, witnh the same command i have this result 10.20 .... i supect that this behavior is changed from SP1 ... anyone can confirm this supect ? .. and is a Feauture or is an Introduced Bug ??
>>>>>>
>>>>>>Emanuele
>>>>>
>>>>>I can confirm that transform() function bechavior changed in VFP 7. Contrary to what help says it doesn't strip trailing zeros from the decimal portion anymore. I think it's a bug.
>>>>
>>>>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 doesn't matter.
Haven't you learned, yet, that calling anything a bug brings out certain people to say otherwise regardless of the facts. They can just make up a new fact to suit the current situation.

My guess is that it is because of this phenomenon that the VFP BUG List is very very very RARELY updated. This way the makers of the new rules get to set the new rules and then there is no need for a bug to be declared.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform