Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxPro compiler error
Message
De
06/02/2013 16:18:09
 
 
À
06/02/2013 15:47:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01565298
Message ID:
01565344
Vues:
42
You said: The syntax of the source code line was the issue. Not what it evaluated to at runtime. Using the explicit syntax:

I disagree. What you are saying is that if I wanted to use macro substitution in that line, I would get an error, and that I would be prevented from compiling my EXE because of that error.

I think this is being handled correctly. It is in fact impossible to know that that line of code has a problem, just as for this simple line:
foo = (&a
That could in fact be a valid line of code, there is no way to tell. I certainly don't want VFP to prevent me from doing so, should I choose.

>>They likely didn't pursue it too rigorously since it would depend
>>on the result at runtime.
>>
>>missed1 = "this and &that"
>>that = "o'"
>>result is "this and o'". Which is fine.
>>that = 'o"'
>>result is "this and o""
>>That last could only crash at runtime (like execscript) or with some
>>major smarts in the IDE/Compiler.
>
>The syntax of the source code line was the issue. Not what it evaluated to at runtime. Using the explicit syntax:
>
foo = 'an &example''
>is incorrect and should've been caught, as the same line would be were the ampersand removed, and not be allowed.
>
>>Better, IMO, is not to use & for such simple things, opting for things
>>like the following instead.
>>missed1 = "this and " + m.that
>>that = 'o"'
>
>True of course. This is from a project dating back to the early 90s.
Jim Nelson
Newbury Park, CA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform