STARTDIR$: Difference between revisions
Jump to navigation
Jump to search
Code by Galleon
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
No edit summary |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:_STARTDIR$}} | {{DISPLAYTITLE:_STARTDIR$}} | ||
The [[_STARTDIR$]] function returns the path a user called a QB64 program from. | 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). | ||
Line 12: | Line 12: | ||
{{PageAvailability}} | {{PageAvailability}} | ||
<!-- QB64 = a version or none, QBPE = a version or all, Platforms = yes or no --> | |||
* '''QB64-PE | <gallery widths="48px" heights="48px" mode="nolines"> | ||
File:Qb64.png|'''v1.0''' | |||
File:Qbpe.png|'''all''' | |||
File:Apix.png | |||
File:Win.png|'''yes''' | |||
File:Lnx.png|'''yes''' | |||
File:Osx.png|'''yes''' | |||
</gallery> | |||
<!-- additional availability notes go below here --> | |||
* 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. | |||
Latest revision as of 23:55, 25 January 2025
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 |
See also