Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FoxPro compiler error
Message
From
06/02/2013 15:47:44
 
 
To
06/02/2013 14:14:49
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01565298
Message ID:
01565336
Views:
49
>They likely didn't pursue it too rigorously since it would depend
>on the result at runtime.
>
>missed1 = "this and &that"
>that = "o'"
>result is "this and o'". Which is fine.
>that = 'o"'
>result is "this and o""
>That last could only crash at runtime (like execscript) or with some
>major smarts in the IDE/Compiler.

The syntax of the source code line was the issue. Not what it evaluated to at runtime. Using the explicit syntax:
foo = 'an &example''
is incorrect and should've been caught, as the same line would be were the ampersand removed, and not be allowed.

>Better, IMO, is not to use & for such simple things, opting for things
>like the following instead.
>missed1 = "this and " + m.that
>that = 'o"'

True of course. This is from a project dating back to the early 90s.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform