Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Syntax error - Urgent!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00475084
Message ID:
00475295
Vues:
53
>Nadya,
>If it's the program that is calling your app that is geting the syntax error, why not start eliminating parts of this calling procedure until the problem goes away, then you'll know who the culprit is?
>
Hi Marty,

Well, I guess, it's my only chance. I still didn't see a reason for this error.

>M.
>
>>Vlad,
>>
>>I put this in calling procedure:
>>
do stats.app with 'run', '2YearsRpt', 'vAllConfigs',('\redp\dbc\'+oJC.curState+'\'+oJC.curState+'Stats'),ojc.outtable,val(oJC.CalYear), .f., oJC.ccode, oJC.CalPeriod
>>
>>Still &cmd. gives me a Syntax error.
>>Do you see problems with this syntax?
>>
>>
>>>Hi!
>>>
>>>As I said, use .F. instead of "" (Logical type .F., not a character string). In VFP all omitted parameters of procedure checked using !(vartype("something") == "L"). If it is logical and .F., probably it is omitted when procedure called. So .F. should work in your case when the application expects omitted parameters. "" - is not omitted parameter and might have significant value for the application/procedure you call.
>>>
>>>HTH.
>>>
>>>>Vlad,
>>>>
>>>>I put "" instead of empty parameter, but it didn't help :( This is really weird, because the similar code worked fine in other cases. May be I just don't see something simple?
>>>>
>>>>BTW, cmd is stored in a Table, e.g. table has a Memo field CallProc. The program reads content of this memo field into variable cmd, and then
>>>>&cmd.
>>>>This line gave me a Syntax error.
>>>>
>>>>I can, however, execute the same line from the command window....
>>>>
>>>>Thanks in advance.
>>>>
>>>>>Hi!
>>>>>
>>>>>I guess no, but you're calling app that might have differences. To be sure try to put .F. on that place (skipped parameters will contain .F. anyway in the called procedure).
>>>>>
>>>>>In addition, inside '[]' brackets include file constant definitions are processed, so strings there might be replaced by something. For example, when you have somewhere in the code following definition
>>>>>
>>>>>#define curState 1
>>>>>
>>>>>you will probably get error even when command looks correct. Try to use '""' instead of square brackets.
>>>>>
>>>>>HTH.
>>>>>
>>>>>>Hi everyone,
>>>>>>
>>>>>>I have "Syntax error" on this line of code (not my application):
>>>>>>&cmd.
>>>>>>
>>>>>>cmd=[do stats.app with 'run', '2YearsRpt', 'vAllConfigs','\redp\dbc\'+oJC.curState+'\'+oJC.curState+'Stats',ojc.outtable,oJC.CalYear, , oJC.ccode, oJC.CalPeriod]
>>>>>>All oJC properties have thier values:
>>>>>>oJC.outTable="redp\Putput\Stats\Harford"
>>>>>>oJC.curState="CT"
>>>>>>oJC.CalPeriod="12"
>>>>>>oJC.CalYear="2000"
>>>>>>oJC.ccode="31"
>>>>>>
>>>>>>Could it be a problem, what one parameter is skipped?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform