Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting Numbers into Strings
Message
De
25/01/2001 11:54:46
 
 
À
25/01/2001 11:29:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00468512
Message ID:
00468535
Vues:
18
Will,

I'm using the following code to calculate the width of numeric fields in a grid:

ALLTRIM(TRANSFORM(nField))

This respects the decimals, but removes trailing 0s:

ALLTRIM(TRANSFORM(12345678.1234560000)) = "12345678.123456"
ALLTRIM(TRANSFORM(00000000.0000000000)) = "0"

If you need these 0s, as you mentioned, I guess you have to use AFIELDS():

STR(nField, laFields[i,3],laFields[i,4])

Hope this helps
Daniel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform