Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CHRTRAN not working for me
Message
 
 
To
09/04/2008 09:25:35
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01309270
Message ID:
01309308
Views:
8
>This goes into an endless loop for me. It is not stripping out the period so it just keeps looping.
>
>
>tcName = 'Amerson, Jr., Harry L'
>
>* Strip periods
>DO WHILE AT('.',tcName) > 0
>	CHRTRAN(tcName,'.','')
>ENDDO
>
>
>Oh, and I didn't look at the help, but the intellisense was pretty clear on the syntax. I may have missed something though. Sorry if I did, but I would really like some help here. Or maybe some suggestions on a better way to do it.

You forgot to assign result to your variable, e.g.
tcName = chrtran(tcName, ".", "")
But why you can not remove them all at once, since that's what your code is doing anyway? E.g. chrtran as you wrote it will remove all dots, so you don't need a loop.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform