Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transform & Set Decimal
Message
De
19/02/2002 09:29:43
 
 
À
19/02/2002 09:07:04
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00621870
Message ID:
00621890
Vues:
15
Agnes, you can force it to 1 decimal with the format code instead of using set decimals. SEe the difference:
set decimals to 2   && rounds the number to 2 decimals
i=12.80
? TRANSFORM(i,'999999.9')
? TRANSFORM(i,'999999.99')
set decimals to 0   && rounds the number to 0 decimals
i=12.80
? TRANSFORM(i,'999999.9')
? TRANSFORM(i,'999999.99')
>Hi All,
>
>I used TRANSFORM to put a number to a string.
>
>The number ist to decimals. SET DECIMALS is 1
>
>if I do
>
>?TRANSFORM(12.75,'@R 99.99)
>
>
>the result is 12.80
>
>what do I miss?
>
>Agnes
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform