_STARTDIR$

From QB64 Phoenix Edition Wiki
Revision as of 23:55, 25 January 2025 by RhoSigma (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The _STARTDIR$ function returns the path a user called a QB64 program from as a string value without a trailing path separator (see also Availabitlity below).


Syntax

callPath$ = _STARTDIR$


Description

  • Returns a STRING representing the user's program calling path.


Availability

  • Since QB64-PE v4.1.0 the path is always returned with a trailing path separator, hence you don't need to add it yourself anymore. The change was implemented to be in line with _DIR$ and _FULLPATH$.
    • Old code, which is adding a separator, still works as all supported platforms were tested and proved they doesn't care about multiple consecutive path separators.


Examples

Example: Showcasing QB64 path functions:

$CONSOLE:ONLY
_DEST _CONSOLE
SHELL "cd"
PRINT _CWD$
PRINT _STARTDIR$
SYSTEM
Code by Galleon


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link