Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compiler does not catch this syntax error, bug?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00901990
Message ID:
00902060
Views:
24
Dawa,

If I type this into a MODI COMM window:
select a, ; 
       b, ; 
       c ; 
       d, ; 
  from mydb!table1 ; 
  into cursor curjjj 
And then:

1) save the prg I get the error: "Command contains unrecognized phrase/keyword" because I have compile before save checked.

2) select Program, then Compile from the menu, I get the error

3) highlight the command in the editor and do a rightclick, execute selection, I get the error.

This is in VFP6 I can't test in 8 at the moment.

>Hi, all,
>
>I just noticed this. If I have a SQL stement as follows:
>
>
>select a, ;
> b, ;
> c ;
> d, ;
> from mydb!table1 ;
> into cursor curjjj
>
>
>When I save the prg, it does not tell me that there is a syntax error. But when this line gets excuted I get
>"Command contains unrecognized phrase/keyword." message. I am using VFP 7. Is this a bug in the compiler? If so, is it fixed in VFP 8? It would be more productive if VFP told me that there is a comma missing or there is an extra comma, then I can fix it right on the spot. Instead I have to debug, get an error, stop the debugger, find my prg, find the line, then look for the syntax that caused the error. It's time consuming when I have alot of fields, in the above like statements, to go through the process. On the other hand, once discovered, it is easily fixed in the code.
df (was a 10 time MVP)

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

Click here to load this message in the networking platform