Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strtran() and double-ampersand
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00745610
Message ID:
00745618
Views:
21
Raymond,

&& is always used to signal an end of line comment, the parser doesn't acknowledge that they are appearing inside a string constant. So your code fails because it ends up being an incomplere command ? strtran("change

This will work though:

? strtran("change &" + "& to something", "&", "a")

>? strtran("change && to something", "&", "a")
>
>fails with "command contains unrecognized phrase/keyword".
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform