Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting Numerics in Right-Aligned strings
Message
From
08/07/1997 18:44:47
 
 
To
08/07/1997 11:47:06
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00038937
Message ID:
00039016
Views:
35
>>if you are talking about string in hebrew or arabic
>>the best way would be to use a localized version of windows and a localized
>>version of VFP (there is one for hebrew most probably an arabic version is
>>alos available - it shouldn't be too differnet)
>>
>>Arnon
>>
>>>
>>> What is the quickest way of converting numerics in right-aligned strings
>>> ??
>>>
>>> Is a handy method available with anyone or I have to write the whole
>>> routine myself...
>>>
>>> Thanks in advance...
>>>
>
>Sorry, I should have been more clear, see
>
>mynum=23.49 && actual length suppose 6,2
>mychar=allt(str(mynum)) && will return "23.49"
>
>&& I want " 23.49" & a space in front of 23.49
>
>this will give me a left aligned character, I want it right aligned(spaces padded in front of it)

Maybe I'm missing something, but it seems obvious to me that the easiest solution is:

str(mynum, 6, 2)

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform