Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxPro compiler error
Message
De
06/02/2013 15:47:44
 
 
À
06/02/2013 14:14:49
Mike Yearwood
Toronto, Ontario, Canada
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:
01565336
Vues:
47
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform