Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loosing decimal places
Message
De
02/06/1999 10:30:01
 
 
À
02/06/1999 10:25:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00225344
Message ID:
00225346
Vues:
10
>I am writing a value like 1.47 into a file on the way into the file i am taking this value and doing a alltrim(str(round(a,2))) like so because it is a numeric feild going to a alpha once i write it to the file it works fine but it chops off everything to the right of the decimal i tried taking the alltrim off and no luck any ideas?

James,

Give the STR function a length and number of decimals parameter

i.e. alltrim( str(round(a,2), 10, 2))

HTH
regards

Ian
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform