08-22-2024, 11:55 AM
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.
_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.