1
1
Fork 0
mirror of https://github.com/DualBrain/QB64.git synced 2023-11-19 13:10:13 +00:00

Adding missing _S* files.

This commit is contained in:
Cory Smith 2022-12-26 14:30:40 -06:00
parent aff4b3672a
commit f728d3ea05
3 changed files with 72 additions and 0 deletions

38
wiki/_STARTDIR$.md Normal file
View file

@ -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)

17
wiki/_STRCMP.md Normal file
View file

@ -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)

17
wiki/_STRICMP.md Normal file
View file

@ -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)