Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple Transform() Problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00838401
Message ID:
00838438
Views:
20
Hi Scott,

-------------
I have VFP 7 SP1, and have a couple of problems (or interpretations) with the way TRANSFORM() works:

SET DECIMALS TO 2
SET FIXED OFF
? TRANSFORM(4.220)
This should return "4.22", but it returns "4.220". It works correctly in VFP 6.
---------

This is correct, on VFP6 it is a bug.

With SET FIXED ON it is ok
SET DECIMALS TO 2
SET FIXED ON
? TRANSFORM(4.220)
------------
Here's another:

SET DECIMALS TO 2
SET FIXED OFF
? TRANSFORM(4.225,"99.999")
I would think with SET FIXED OFF that this would return "4.225", but it returns "4.230", which means it is somehow honoring the SET DECIMALS internally, then maps it externally to my picture.
----------

This is a bug, if is defined a cFormatCodes, VFP must ignore SET DECIMALS TO setting.

Fabio
Previous
Reply
Map
View

Click here to load this message in the networking platform