Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting Numbers into Strings
Message
 
 
À
25/01/2001 13:06:44
Michel Lalonde
Laboratoire Médical Biron
Lachine, Québec, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00468512
Message ID:
00468631
Vues:
11
Minor correction :
second line should be ? LTRIM(PADL(N,25))

>Check PADL, PADR and PADC functions
>
>Exemple
>
>N = 122.011121
>? LTRIM(PADL(N),25)
>==> 122.011121
>
>
>
>>Hello people,
>>
>>I have a little question that's really bugging me...
>>I am trying to write a generic routine to work out the maximum width of the data in a column in a grid.
>>
>>If the data is Numeric I run into problems
>>Str(1.23456) returns 1
>>So I have to specify the Length & decimal places
>>Str(1.23456, 8,5)
>>
>>When I know the format of the number it's easy but how do I do this when I don't know how many dec places the number has?
>>
>>I can get this info from the source table (aFields) but there HAS to be a cleaner way of doing this.
>>
>>Any suggestions?
>>
>>TIA
>>Will
Wine is sunlight, held together by water - Galileo Galilei
Un jour sans vin est comme un jour sans soleil - Louis Pasteur
Water separates the people of the world; wine unites them - anonymous
Wine is the most civilized thing in the world - Ernest Hemingway
Wine makes daily living easier, less hurried, with fewer tensions and more tolerance - Benjamin Franklin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform