Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 7, set default to command, set to drive letter?
Message
From
09/04/2002 11:22:02
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00642664
Message ID:
00642711
Views:
11
Thanks.
I had a typo, actual command is SET DEFAULT TO (m.gcDefDir)

This an existing application original code in FPW 2.6 rewritten by several people and old code got carried forward.

>>I an not sure if I do not understand the set default command or if this is a bug.
>>
>>I determine the default directory and assign it to a variable, i.e
>> m.gcDefDir = SUBSTR(SYS(16,0),1,RAT('\',SYS(16,0)))
>> i.e 'c:\defdir'
>>Then I a set the default directory using the command
>> set default to m.gcDefDir
>>The command
>> ? set("default)
>>returns "C:" instead of "c:\defdir". Is that correct? If not what am I doing wrong?
>
>First, you can use justpath() function. Second you've to enclose m.gcDefDir variable in the parenthesis to tell VFP that's Name Expression.
>
>
m.gcDefDir = JUSTPATH(SYS(16,0))
>set default to (m.gcDefDir)
>? FULPATH("")
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform