Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting Numerics in Right-Aligned strings
Message
From
09/07/1997 10:28:05
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
 
 
To
09/07/1997 08:10:59
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00038937
Message ID:
00039083
Views:
44
>>>
>>>Maybe I'm missing something, but it seems obvious to me that the easiest solution is:
>>>
>>>str(mynum, 6, 2)
>>>
>>>Vlad
>>
>>Yes, this will work and this is the simplest...Thanks
>>
>>But speaking honestly, I'll still use Mr Dave's Method, as there I just have to specify total length, here I have to give 2 values, total length and decimal places, Actually Mr Dave's method is fitting perfectly in my code without much changes.
>>
>>Thanks again for your reply.
>
>Don't you lose the decimals? The whole idea is that what STR function right aligns and it can get 1, 2 or 3 params. Ie: right(space(9)+alltrim(str(mynum)),9) is equivalent with str(mynum,9). In the 1st formula you just drop and add spaces at left, which is useless.
>
>Vlad

You r right !!! I didn't thought of that...(Sorry for that..)

I don't want to loose the decimals,

Thanks..I will modify my code..
Previous
Reply
Map
View

Click here to load this message in the networking platform