Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
First time with VFP to Excel
Message
From
11/04/2002 09:15:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00643532
Message ID:
00643690
Views:
18
>>>Tip: You can use: transform( reccount() ) and
>>> that will trim spaces as well.
>>
>>I used to like transform() - but the results are
>> not always trustworthy. For instance, in VFP 6,
>> SP5, (-80.1) returns "-80.09999999999999".
>I didn't know that. Thanks for the heads up.

... and in VFP 7, where they apparently tried to fix this problem, trans() sometimes returns a seemingly arbitrary number of unneeded decimals - like "8.500", when you expect unneeded zeroes to be trimmed.

Apparently you are better off creating a UDF for trimming unneeded zeroes (one transform within another - and an alltrim() in between - will do the trick).

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform