Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compiler does not catch this syntax error, bug?
Message
From
11/05/2004 02:31:41
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00901990
Message ID:
00902723
Views:
18
Hi Dawa,

>However, a compiler should be able to detect following error without doing a macro substitution.

>
>SELECT &lcAlias..*,from &lcAlias INTO CURSOR curabc
>
>I cannnot think of any possible value in the lcAlias that would make the above statement correct.
>Could you?

well I could think of this case:

>
lcMacro1 = " field1, ' " 
lcMacro2 = " ' as dummy FROM Mytable ' " 

SELECT &lcMacro1..*,from &lcMacro2 INTO CURSOR curabc
>
As I said before, commands containing macros are not compiled during applications' compiletime, but at runtime. VFP is constructed in such way that it does not make any assumptions on the possible contents of the macro's and skips compilation and syntax checking entirely. I don't think it is feasible to do otherwise. As you see in the sample above this would be rather impossible.

Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform