Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange results in COM DLL
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00467419
Message ID:
00467472
Vues:
18
Hi!

Sure, it is a bug in transform() function. When I used "transform(MyNumber,'999 999 999.999')" for small number (0.0024), it just displays '0.000'... ;(((

>>>George,
>>>This could be a problem with rounding and how many decimal places are displayed. I think outputting the values to text respects SET DECIMAL so the values may look exact. However, internal processing may have the values off by .000001 (not equal). My suggestion would be to use ROUND() where you need to to make the number of places decimal explcit to what you want.
>>>
>>>HTH.
>>
>>Larry,
>>
>>Thanks for the response.
>>
>>I considered that issue (and the bug regarding very small numbers). DECIMALS is set to 4. However, in this case there are a couple of things that make me wonder if this applicable to this case. First off, it would seem to me that 145.6 divided by 0.1000 shouldn't yield this when compared to 1456 and against other data it hasn't. Second, in VFP, working with the same data, using the same DLL it works fine.
>>
>>Frankly, in this case I've got to approaching rounding very carefully. For example, the nTuftedWidth property may be divided by a value as small as 0.078125. The if the result of this is off by as little as 0.00032, then the underlying values are incorrect.
>
>George,
>
>There is a bug in TRANSFORM function.
>According to KB Article Q247494 "You might see that the results of the TRANSFORM() function appear off by approximately .0000000000001. This behavior may occur when COMPATIBLE is OFF."
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform