forked from QB64-Phoenix-Edition/QB64pe
-
Notifications
You must be signed in to change notification settings - Fork 0
$END IF
github-actions[bot] edited this page Jun 16, 2022
·
4 revisions
The _CWD$ function returns the current working directory path as a string value without a trailing path separator.
- = _CWD$
- By default, the initial working directory path is usually the same as the directory of the executable file run.
- The current working directory can be changed with the CHDIR or SHELL command; CHDIR sets it, _CWD$ returns it.
- Path returns will change only when the working path has changed. When in C:\ and run QB64\cwd.exe, it will still return C:\
- The current working directory string can be used in OPEN statements and SHELL commands that deal with files.
- Works in Windows, macOS and Linux. _OS$ can be used by a program to predict the proper slash separations in different OS's.
- If an error occurs while obtaining the working directory from the operating system, error code 51 (Internal Error) will be generated.
We started at C:\QB64 We are now in C:\QB64\a_temporary_dir And now we're back in C:\QB64