Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this a best practice?
Message
From
20/07/2004 12:32:36
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00925541
Message ID:
00926164
Views:
15
>--
>BTW, speaking of getting the path, I've seen sys(5)+curdir(), or chopping the sys(16) so many times, and it just looks to me like too much typing :). Seems to be nobody knows about Set("directory") (or set("dire") which also works),
>--
>
>Does not do always what I was suggesting, though. SET("DIRE") doesn't tell you where the EXE is in the same way as SYS(16,0) does -- unless you run the code with SET("DIRE") up-top in your app.
>
>My point was that you could find out where the EXE was at any time, you didn't need to say "this code belongs up-top in the MAIN.PRG" necessarily.

I meant it as a means of finding the fullpath of the current directory. CurDir() gives you no drive, and sys(16) needs to be parsed. Set("Dire") is simpler, and it seems to be some sort of my private secret, since I think I haven't seen anyone here using it in their code samples.

The location of the exe is a different matter, of course - it may be run from a shortcut where "start in" is not the same as the directory where the exe is, so we have to distinguish these anyway.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform