Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transform vs round
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01024029
Message ID:
01024051
Vues:
22
>Is there a way to stop the transform function to round to what Set Decimals is set to?
>
>Ex
>
>SET DECIMALS TO 2
>? TRANSFORM(999.0288, '#####.###') && Prints 999.030
>SET DECIMALS TO 3
>? TRANSFORM(999.0288, '#####.###') && Prints 999.029
>
Chuck, here is a workaround:
n=SET("Decimals")
SET DECIMALS TO 4
? TRANSFORM(TRANSFORM(999.0288, '#####.#####'), '#####.###') && Prints 999.028
SET DECIMALS TO (m.n)
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform