Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why does a double backslash works the same way as a sing
Message
De
02/02/2006 11:17:07
 
 
À
02/02/2006 10:43:26
Donald Lowrey
Data Technology Corporation
Las Vegas, Nevada, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Divers
Thread ID:
01092866
Message ID:
01092904
Vues:
17
>Can someone explain why a double backslash works when used to define a path?
>
>While assigning a value to for temp work folder, we accidentally got two back slashes assigned to a variable. Using the variable worked, so we didn't discover this for a while. Look:
>
>USE [sometable]
>lcprivdir = "c:\temp\"
>COPY TO lcprivdir + "\myfile.dbf"    && Results in c:\temp\\myfile.dbf
>DELETE FILE lcprivdir + "\myfile.dbf"
>
>OR even this way:
>lcmyfilevar = lcprivdir + "\myfile.dbf"  && lcmyfilevar = c:\temp\\myfile.dbf
>COPY TO lcmyfilevar
>
>
>I am really curious as to why the double back slash does not throw an error. Anyone have an idea? Or did I cut school the day this was explained?

look these:
? FULLPATH("win.ini","c:\window\system32")
? FULLPATH("win.ini","c:\\\\\\\\\\\\\\\\\\window\\\\\\\\\\\\\\\\\\\system32")
? FULLPATH("\\\\\\\\\\\\\\\win.ini","c:\\\\\\\\\\\\\\\\\\window\\\\\\\\\\\\\\\\\\\system32")
* look the time delay
? FULLPATH("win.ini","\\\\\\\\\\\\\\\\\\window\\\\\\\\\\\\\\\\\\\system32")
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform