Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TRANSFORM() question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
TRANSFORM() question
Miscellaneous
Thread ID:
01126152
Message ID:
01126152
Views:
53
In a piece of method code, I am attempting to create a string which includes a numeric value that specifically needs 5 decimal places. I thought I could save time by doing something like this:
TRANSFORM(nRate, "99.99999")
However, in a test case where nRate is 0.5425, the above statement returns 0.54. Interestingly enough, when no format code is used, TRANSFORM() will return 0.5425. Obviously, I know I can change the code to use ALLTRIM(STR()), but I don't understand why the above statement does any rounding whatsoever on a numeric value that clearly does not exceed the size of the format.

Any ideas??

Laterness,
Jon
Jon Rosenbaum
Devcon Drummer
Next
Reply
Map
View

Click here to load this message in the networking platform