Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set default to...
Message
De
23/07/2001 08:07:12
 
 
À
23/07/2001 08:05:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00528803
Message ID:
00533831
Vues:
9
>>VFP is smart enough to recognize a SYS() function or other string expressions and implicitly use name resolution on the expression, as it would with:
>>
>>CD "C:\Foo" + "\Bar\Mumble Bletch"
>>
>>SYS(5) will not contain a space unless you have explicitly referenced a UNC whose UNC name (\\server\share name). Since VFP uses implicit name resolution IAC for this example, it doesn't matter. I'd probably use
>>
>>CD (SYS(5))
>>
>>to explicitly invoke name resolution rather than rely on the implied behavior, and I do not use SYS(5) IAC - I tend to use FULLPATH(CURDIR()), a more explicit statement - SYS(5) resolves to the relative path of the current default drive; so does FULLPATH(CURDIR()). Explicit name resolution avoids errors at no cost in both situations; why make the next person guess at my intent.
>>
>>CD and SET DEFAULT TO are identical in this behavior. This is the stated behavior of VFP commands which take a single name as an argument.
>
>
>Hi Ed,
>
>Ditto with Len on the explanation. Am I correct in assuming that in order to avoid confusion with UNC's, spaces in directory names, you prefer to use FULLPATH(CURDIR()), since it will explicitly resolve any naming idiosyncracy?
>
>Also, what happens with resolving the UNC share;
>
>SET DEFAULT TO "SERV_NAME\N_DRIVE\SomeFolder", in the case where "SERV_NAME\N_DRIVE" resolves to drive 'N:\' say, where the exe is actually located in the map 'N:\SomeFolder'. (There are no spaces on purpose).
>
>Is it precisely the sort of confusion you want to avoid when you say 'use FULLPATH(CURDIR())'?
>
>TIA
>
>Sanjay

Sorry, that should read "\\SERV_NAME\N_DRIVE" in all cases.

Thanks
Sanjay Kapoor

Relatively speaking is a conversation with Einstein
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform