Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this a Bug?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00812190
Message ID:
00812193
Views:
18
Hi Simon,

It's a known issue since FOX 2.6 days, maybe even eirlier. FoxPro incorrectly treat '&&' in the string literal as beginning of the inline comment. A workaround is to separeate '&&' characters.
lcTxt= "&" + "&"
lcTxt = "!!!#&" + "&"
and so on
>Hi
>
>If you try any of the following you get an error in VFP 7 and VFP8.
>
>lcTxt="&&"
>
>lcTxt="!!!!&&"
>
>lcTxt="!!!#&&"
>
>Store "&&" To lcTxt
>
>However, the following works okay.
>
>lcTxt="&"+Chr(Asc("&"))
>
>
>You maybe wondering why I am interested in this problem. The problem arose when analyzing some data with unique ID values that occassionally ended in the double "&" sign. I received and error any time I tried to store the ID value to a memory variable or use the Set Key To (lcID) when ID or lcID ended in the double "&" sign.
>
>Thanks,
>Simon
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform