Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting Numbers into Strings
Message
From
25/01/2001 11:54:46
 
 
To
25/01/2001 11:29:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00468512
Message ID:
00468535
Views:
17
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
Previous
Reply
Map
View

Click here to load this message in the networking platform