Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strtran() / Stuff() / Padr() ???
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00249697
Message ID:
00250668
Views:
33
Hi Mike,
>
>>lcInput= '###,###,###.##'
>>lcOutout = FORCEEXT(lcInput, '00')
>
>Well to echo my friend: DOH! Now thats cool, but you'll have to account for a Vinods 2nd situation: "###,###.####".

How about:
lcInput= '###,###,###.####'
lnlbs = OCCURS("#", SUBSTR(lcInput, RAT('.', lcInput)))
lcOutput = FORCEEXT(lcInput, REPLICATE('0', lnlbs))
Works in VFP 6.0.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform