Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error Using &
Message
De
29/08/2005 14:15:33
 
 
À
29/08/2005 14:12:12
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01044845
Message ID:
01044848
Vues:
13
>This code works fine:
>
>
>temppath = "'" + GetEnv("TEMP")+"\PDM Docs\" + "'"
>If !DIRECTORY(&temppath) Then
>	MD &temppath
>EndIf
>
>
>But when I try to get away from using the Public var temppath with following code I get an error that second line of code is missing a ')'.
>
>
>pdmVar.temppath = "'" + GetEnv("TEMP")+"\PDM Docs\" + "'"
>If !DIRECTORY(&pdmVar.temppath) Then
>	MD &pdmVar.temppath
>EndIf
>
The macro expansion stops at the first period! My rule number one: always use a name expression, whenever possible.
temppath = "'" + GetEnv("TEMP")+"\PDM Docs\" + "'"
If !DIRECTORY(temppath) Then
	MD (temppath)
EndIf
pdmVar.temppath = "'" + GetEnv("TEMP")+"\PDM Docs\" + "'"
If !DIRECTORY(pdmVar.temppath) Then
	MD (pdmVar.temppath)
EndIf
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform