diff --git a/wiki/_STARTDIR$.md b/wiki/_STARTDIR$.md new file mode 100644 index 0000000..87df123 --- /dev/null +++ b/wiki/_STARTDIR$.md @@ -0,0 +1,38 @@ +The [_STARTDIR$](_STARTDIR$) function returns the user's working directory when the program was started. + +## Syntax + +> callPath$ = [_STARTDIR$](_STARTDIR$) + +## Description + +The user's working directory depends on how the program was launched. Note that these are ultimately controlled by the launching environment, so might differ in non-standard setups. +* If the program was run from a graphical file manager, _STARTDIR$ will be the path to the directory of the binary file. +* If launched from the command line, _STARTDIR$ is the shell's current working directory, as manipulated by the 'cd' command. +* If launched via a shortcut on Windows _STARTDIR$ will be the "Start in" property, which defaults to the location of the shortcut's target file. + +The value of [_STARTDIR$](_STARTDIR$) may differ from [_CWD$](_CWD$) even at program start, because QB64 program change their current directory to the binary's location. _STARTDIR$ is the directory inherited from the user's environment, while [_CWD$](_CWD$) will start off as the location of the program binary file. Because files are opened relative to [_CWD$](_CWD$), this can be useful for programs that expect to open e.g. graphical or sound assets, but problematic for programs that want to interpret paths supplied by the user as relative to the user's current directory. In the latter case, add a 'CHDIR _STARTDIR$' to the top of the program. This will change back to the working directory inherited from the environment. + +## Availability + +* Version 1.000 and up. + +## Example(s) + +Showcasing QB64 path functions: + +```vb + +$CONSOLE:ONLY +_DEST _CONSOLE +SHELL "cd" +PRINT _CWD$ +PRINT _STARTDIR$ +SYSTEM + +``` + +## See Also + +* [_CWD$](_CWD$) +* [SHELL](SHELL) diff --git a/wiki/_STRCMP.md b/wiki/_STRCMP.md new file mode 100644 index 0000000..754c5d0 --- /dev/null +++ b/wiki/_STRCMP.md @@ -0,0 +1,17 @@ +The [_STRCMP](_STRCMP) function compares the relationship between two strings, comparing upper or lower case. + +## Syntax + +> comparison% = [_STRCMP](_STRCMP)(string1$, string2$) + +## Description + +* Function returns -1 when string1$ is less than string2$, 0 when equal or 1 when string1$ is greater than string2$. +* Upper case letters are valued less than lower case letters in the [ASCII](ASCII) evaluation. + +## See Also + +* [_STRICMP](_STRICMP) +* [STR$](STR$) +* [STRING](STRING) +* [ASCII](ASCII) diff --git a/wiki/_STRICMP.md b/wiki/_STRICMP.md new file mode 100644 index 0000000..3cbac38 --- /dev/null +++ b/wiki/_STRICMP.md @@ -0,0 +1,17 @@ +The [_STRICMP](_STRICMP) function compares the relationship between two strings, ignoring upper or lower case letters. + +## Syntax + +> comparison% = [_STRICMP](_STRICMP)(string1$, string2$) + +## Description + +* Function returns -1 when string1$ is less than string2$, 0 when equal or 1 when string1$ is greater than string2$. +* Alphabet comparisons will be evaluated without regard to the letter case in the 2 strings. + +## See Also + +* [_STRCMP](_STRCMP) +* [STR$](STR$) +* [STRING](STRING) +* [ASCII](ASCII)