Hi Dawa,
Actually, because of the macros, that line is not compiled during compilation time, but during runtime. That explains why the error is not catched.
Walter,
>I am sorry guys who replied to my initial message. The sample bug code wasn't true representative of the my actual code. Here is a better one and see if you can compile it with a syntax error:
>
>
>*bug.prg
>LPARAMETERS m.lpcAlias,m.lpnid
> SELECT &lpcAlias..filenum ;
> &lpcAlias..a, ;
> &lpcAlias..b ;
> &lpcAlias..c, ;
> &lpcAlias..d, ;
> FROM &lpcAlias ;
> ON &lpcAlias..id = m.lpnid;
> INTO CURSOR curTemp NOFILTER
>
>
>
>Now save the code as a prg and compile it however you like. I do not get a syntax error.
>
>Dawa
>
>>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.