Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use of _STARTDIR$
#3
(08-22-2024, 11:55 AM)luke Wrote: Upon startup, QB64 programs implicitly execute a CHDIR to change to the directory containing the .exe file. This is so OPEN statements with paths relative to the .exe work as expected. You can show this location with the _CWD$ function.

_STARTDIR$ returns the current working directory before the implicit CHDIR at startup. This value is controlled by whatever executed the program, so your launcher is responsible for setting this value. In a standard Windows shortcut, this is controlled by the "Start in" parameter.

You probably don't want to use _STARTDIR$, it's for specific cases like command-line utilities that need to interpret user-supplied paths consistently no matter where the .exe is located.
Thank you, the difference wasn't entirely clear to me, but now you've made it evident.

On the other hand, the wikis in certain areas are minimal and also in a language that is not mine.
Reply


Messages In This Thread
Use of _STARTDIR$ - by krovit - 08-22-2024, 10:04 AM
RE: Use of _STARTDIR$ - by luke - 08-22-2024, 11:55 AM
RE: Use of _STARTDIR$ - by krovit - 08-22-2024, 02:16 PM



Users browsing this thread: 1 Guest(s)