Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with included constant
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00691361
Message ID:
00691811
Vues:
17
>Thank u for your help, but i realized i put an equal sign after the define clause
>The fact is that i lost an entire day to resolve this mistake
>Thank you again
>Alessio

Arrgghh. That's exactly how it looked like : some kind of macro interpretation. Maybe there is some use case here, thinking of functions like =Inkey(n) ...

Glad you solved it !
Peter






>>Just for (my ?) interest ...
>>
>>Could you post the #DEFINE of the constant, the replace failing on it, the definition of the DB-field concerned, as well as the failing IIF ?
>>
>>BTW, did you isolate the Replace with the one failing field only ?
>>
>>"TIA"
>>
>>Peter
>>
>>>I still cannot explain what happens
>>>The fact is that the error message comes out at design time ....
>>>Maybe something wrong with the include file ? But I use constants without problems even in the same form.
>>>
>>>
>>>
>>>>Alessio,
>>>>
>>>>What I tried to say is that it won't be allowed to have a #DEFINE for a variable WConstant, and "re-use" that by means of WConstant = "SomeValue".
>>>>I didn't try it, but as far as I know it just is allowed to do this, but all kinds of strangenesses occur.
>>>>So look in your programs for the WConstant variable, and look for some assignment command put in by accident (think of STORE too).
>>>>
>>>>By the way, what is the constant value ? obviously some wrong value could cause problems (at a Replace etc.).
>>>>
>>>>HTH,
>>>>Peter
>>>>
>>>>
>>>>>I'm not sure to have understood what u said.
>>>>>Anyway I'm sure i've not used the same name twice and if I define a variable in which i put the constant value it works.
>>>>>the fact is that I cannot explain why i cannot use constant in those cases
>>>>>---
>>>>>
>>>>>>>I included a .h files in a form, i do that everytime, but today i brought into an error :
>>>>>>>I mention a constant in a replace command (replace fieldname with Wconstant)
>>>>>>>but VFP gives me a sintax error, error which fades if I sobstitute the constant with its value.
>>>>>>>The same happened (today is my lucky day) in an IIF command, if I put the constant in the iif values VFP gives me the error "missing expression"
>>>>>>>
>>>>>>>Is it normal or there is some patch to fix that i suppose its a bug ?
>>>>>>>
>>>>>>>Thank U again
>>>>>>>Alessio
>>>>>>
>>>>>>Couldn't it be so that you defined the constant-variable again in the running program (WConstant = "SomeValue") ? (if that would be allowed anyway).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform