Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxPro compiler error
Message
De
06/02/2013 11:32:45
 
 
À
06/02/2013 10:04:52
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:
01565306
Vues:
68
Hi Rick

from VFP help (&& command):

Caution:
Including double ampersands (&&) in a string literal, for example, "AAA&&BBB", generates an error. Instead, to include double ampersands, use concatenation as shown: "AAA&" + "&" + "BBB".

Note:
When using concatenation, use caution with placement of a single ampersand (&), which is used to perform macro substitution and thus might produce undesirable results. For example, suppose you assign the string "YYY" to a variable, BBB. Performing concatenation using "AAA&" and "&BBB" replaces "BBB" with "YYY", so instead of getting the result "AAA&&BBB", the result is "AAA&YYY". For more information, see & Command.

Andrzej



>In at least FoxPro for Windows 2.6 and Visual FoxPro 9, the following syntax errors are not caught by the compiler at compile time, but only by the execution engine at runtime:
>
>
missed1 = 'this and &that''
>caught1 = 'this and that''
>missed2 = "this and &that""
>caught2 = "this and that""
>
>
>Has anybody else seen this? It seems that if the string has a macro, it ignores the incorrect syntax of the mismatched quotes.
>
>Best regards,
>Rick C. Hodgin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform