Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this not irritating?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01101592
Message ID:
01101647
Vues:
9
>There's a way around this, but it's still irritating . . .
>
>
>set decimals to 2
>myvar = 99.999
>? myvar   && Prints 99.999
>? transform(myvar, "999.9999")   && Prints 100.0000
>
This is a bug.

Without parameters TRANSFORM it correctly works.
A side effect is that with a format parameter, you can have ***.**** output !
set decimals to 1
SET FIXED OFF

CLEAR
myvar = 9999.999
? transform(myvar)   && Prints 99.999
? transform(myvar, "@R 9999.9999")   && Prints ****,****
* cause: with a parameter TRANSFORM uses SET DECIMALS
? "this is that that ago VFP before applying the formatting ",TRANSFORM(myvar,"")

* a workaround for this is not simple without a UDF
? TRANSFORM(myvar,"@R 999,999.9999") && wish 9,999.9990
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform