Skip to content

Commit 2d26c48

Browse files
authored
Merge pull request #6 from grymmjack/v0.10.4
Updating to v0.10.4 - markdown help improvements
2 parents db8c700 + aade475 commit 2d26c48

File tree

827 files changed

+24264
-28222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

827 files changed

+24264
-28222
lines changed

changelog.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ All notable changes to the "QB64 PE" extension will be documented in this file.
55
- Enhancements
66
- Modify`tasks.json` to support QB64 PE.
77

8+
## 0.10.4
9+
- Enhancements
10+
- Fixed new markdown hover help for QB64 PE keywords up to version `3.13.1`
11+
- Now works with `config.helpPath`
12+
- For how the markdown is generated look here: https://github.com/grymmjack/qb64pe-wiki-to-markdown
13+
814
## 0.10.3
915
- Enhancements
10-
- Add new markdown hover helpf or QB64 PE keywords up to version `3.13.1`
16+
- Add new markdown hover help for QB64 PE keywords up to version `3.13.1`
1117
- Modified wiki search online help to work with qb64phoenix.com/wiki/
1218

1319
## 0.10.2

help/$ASSERTS.md

Lines changed: 31 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,44 @@
1-
# $ASSERTS
1+
## $ASSERTS
2+
---
23

3-
The **$ASSERTS** [metacommand](metacommand.md) enables debug tests with the [_ASSERT](_ASSERT.md) macro.
4+
### The $ASSERTS metacommand enables debug tests with the _ASSERT macro.
45

5-
6-
7-
## Syntax
8-
9-
**$ASSERTS**
10-
**$ASSERTS:CONSOLE**
11-
12-
13-
## Description
14-
15-
* This metacommand does not require a comment *[']('.md)* or [REM](REM.md) before it. There is no space between the metacommand name, the colon and the CONSOLE parameter.
16-
* If this metacommand is used in a program and any of the set [_ASSERT](_ASSERT.md) checkpoints will fail, then the program will stop with an **_ASSERT failed** error.
17-
* Detailed error messages passed to the [_ASSERT](_ASSERT.md) statement will be displayed in the console window, but only if **$ASSERTS:CONSOLE** is used.
18-
19-
Note
20-
This metacommand is the main switch to enable debug tests during development. Later just remove this metacommand to compile the program without debugging code, all the [_ASSERT](_ASSERT.md) statements may remain in the code for later debugging sessions, they are simply ignored without this metacommand.
21-
6+
#### SYNTAX
227

23-
## Availability
8+
`$ASSERTS`
249

25-
* [![v1.4](![v1.4.md)](File:Qb64.png "v1.4")
10+
#### DESCRIPTION
11+
* This metacommand does not require a comment ' or [REM](./REM.md) before it. There is no space between the metacommand name, the colon and the [CONSOLE](./CONSOLE.md) parameter.
12+
* If this metacommand is used in a program and any of the set [_ASSERT](./_ASSERT.md) checkpoints will fail, then the program will stop with an [_ASSERT](./_ASSERT.md) failed error.
13+
* Detailed error messages passed to the [_ASSERT](./_ASSERT.md) statement will be displayed in the console window, but only if $ASSERTS:[CONSOLE](./CONSOLE.md) is used.
2614

27-
**v1.4**
28-
* [![all](![all.md)](File:Qbpe.png "all")
2915

30-
**all**
31-
* [![Apix.png](![Apix.png.md)](File:Apix.png)
32-
* [![yes](![yes.md)](File:Win.png "yes")
16+
#### EXAMPLES
17+
```vb
18+
$ASSERTS:CONSOLE
3319

34-
**yes**
35-
* [![yes](![yes.md)](File:Lnx.png "yes")
20+
DO
21+
a = INT(RND * 10)
22+
b$ = myFunc$(a)
23+
PRINT a, , b$
24+
_LIMIT 3
25+
LOOP UNTIL _KEYHIT
26+
END
3627

37-
**yes**
38-
* [![yes](![yes.md)](File:Osx.png "yes")
28+
FUNCTION myFunc$ (value AS SINGLE)
29+
_ASSERT value > 0, "Value cannot be zero"
30+
_ASSERT value <= 10, "Value cannot exceed 10"
3931

40-
**yes**
41-
42-
43-
44-
## Examples
45-
46-
Example
47-
Adding test checks for parameter inputs in a function.
48-
49-
``` $ASSERTS:CONSOLE [DO](DO.md) a = [INT](INT.md)([RND](RND.md) * 10) b$ = myFunc$(a) [PRINT](PRINT.md) a, , b$ [_LIMIT](_LIMIT.md) 3 [LOOP UNTIL](LOOP UNTIL.md) [_KEYHIT](_KEYHIT.md) [END](END.md) [FUNCTION](FUNCTION.md) myFunc$ (value [AS](AS.md) [SINGLE](SINGLE.md)) [_ASSERT](_ASSERT.md) value > 0, "Value cannot be zero" [_ASSERT](_ASSERT.md) value <= 10, "Value cannot exceed 10" [IF](IF.md) value > 1 [THEN](THEN.md) plural$ = "s" myFunc$ = [STRING$](STRING$.md)(value, "*") + [STR$](STR$.md)(value) + " star" + plural$ + " :-)" [END FUNCTION](END FUNCTION.md)
32+
IF value > 1 THEN plural$ = "s"
33+
myFunc$ = STRING$(value, "*") + STR$(value) + " star" + plural$ + " :-)"
34+
END FUNCTION
5035
```
51-
5236

5337

54-
## See also
5538

56-
* [Metacommand](Metacommand.md)
57-
* [_ASSERT](_ASSERT.md)
58-
* [$CHECKING]($CHECKING.md)
59-
* [Relational Operations](Relational Operations.md)
60-
* [ERROR Codes](ERROR Codes.md)
61-
62-
39+
#### SEE ALSO
40+
* Metacommand
41+
* [_ASSERT](./_ASSERT.md)
42+
* $CHECKING
43+
* Relational Operations
44+
* [ERROR](./ERROR.md) Codes

help/$CHECKING.md

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,22 @@
1-
# $CHECKING
1+
## $CHECKING
2+
---
23

3-
The $CHECKING metacommand turns C++ event checking ON or OFF.
4+
### The $CHECKING metacommand turns C++ event checking ON or OFF.
45

5-
6+
#### SYNTAX
67

7-
## Syntax
8+
`$CHECKING :{ON|OFF}`
89

9-
$CHECKING:{ON|OFF}
10-
10+
#### DESCRIPTION
11+
* The Metacommand does not require a comment or [REM](./REM.md) before it. There is no space after the colon.
12+
* The [OFF](./OFF.md) action turns event checking off and should only be used when running stable, errorless code.
13+
* The default $CHECKING :[ON](./ON.md) action is only required when checking has been turned [OFF](./OFF.md) previously.
14+
* When $CHECKING :[OFF](./OFF.md) is used, all error code and the reporting code is removed from the EXE program.
15+
* Warning: Turning [OFF](./OFF.md) error checking could create a General Protection Fault (or segfault). Use only with 100% stable sections of code.
1116

12-
## Description
1317

14-
* The Metacommand does **not** require a comment or REM before it. There is no space after the colon.
15-
* The OFF action turns event checking off and should **only be used when running stable, errorless code.**
16-
* The default $CHECKING:ON action is only required when checking has been turned OFF previously.
17-
* When $CHECKING:OFF is used, all error code and the reporting code is removed from the EXE program.
18-
* **Warning: Turning OFF error checking could create a General Protection Fault (or segfault). Use only with 100% stable sections of code.**
19-
20-
### Details
21-
22-
* After every QB64 command is translated to C++, the compiler adds special code sections to check for [ON TIMER(n)](ON TIMER(n).md) "ON TIMER(n)") events and errors that may have occured in the last function call. Disabling error checking with the $CHECKING:OFF directive prevents the compiler from adding the extra code sections.
23-
* Setting $CHECKING:OFF is only designed for 100% stable, errorless sections of code, where every CPU cycle saved counts, such as in a software 3D texture mapper, for example.
24-
25-
26-
27-
## See also
28-
29-
* [ON TIMER(n)](ON TIMER(n).md) "ON TIMER(n)")
30-
* [ON ERROR](ON ERROR.md)
31-
* [Metacommand](Metacommand.md)
32-
* [ERROR Codes](ERROR Codes.md)
33-
34-
18+
#### SEE ALSO
19+
* [ON](./ON.md) [TIMER](./TIMER.md)(n)
20+
* [ON](./ON.md) [ERROR](./ERROR.md)
21+
* Metacommand
22+
* [ERROR](./ERROR.md) Codes

help/$COLOR.md

Lines changed: 46 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,67 @@
1-
# $COLOR
2-
3-
**$COLOR** is a metacommand that adds named color constants into a program, which then can be used instead of hardcoded literal color values.
4-
5-
6-
7-
## Syntax
8-
9-
$COLOR**:**{0|32}
10-
11-
12-
## Parameters
1+
## $COLOR
2+
---
133

14-
* The one and only parameter is a literal number designating either to include [SCREEN 0](SCREEN 0.md) based color indexes, or full [_RGB32](_RGB32.md) color values with full (opaque) alpha.
4+
### $COLOR is a metacommand that adds named color constants into a program, which then can be used instead of hardcoded literal color values.
155

16-
6+
#### SYNTAX
177

18-
## Description
8+
`$COLOR : {0|32}`
199

20-
* **$COLOR:0** adds constants for the colors 0-15 available in **SCREEN 0**, these do also match for the first 16 colors on 8-Bit (256 colors) graphic screens as long as they are not changed using [PALETTE](PALETTE.md) or [_PALETTECOLOR](_PALETTECOLOR.md). For the actual constant names see [$COLOR:0 Name Table]($COLOR:0 Name Table.md).
21-
* **$COLOR:32** adds constants for full 32-Bit color values as used on 32-Bit screens created via [_NEWIMAGE](_NEWIMAGE.md), similar to HTML color names. For the actual constant names see [$COLOR:32 Name Table]($COLOR:32 Name Table.md).
22-
* Prior to QB64-PE v0.5.0, **$COLOR** was not compatible with [$NOPREFIX]($NOPREFIX.md).
23-
* Since QB64-PE v0.5.0, **$COLOR** can now be used with [$NOPREFIX]($NOPREFIX.md), with a few notable differences to three conflicting colors -- Red, Green, Blue.
10+
#### PARAMETERS
11+
* The one and only parameter is a literal number designating either to include [SCREEN](./SCREEN.md) 0 based color indexes, or full [_RGB32](./_RGB32.md) color values with full (opaque) alpha.
2412

25-
Red would conflict with [_RED](_RED.md), Green would conflict with [_GREEN](_GREEN.md), and Blue would conflict with [_BLUE](_BLUE.md), once the underscore was removed from those commands with [$NOPREFIX]($NOPREFIX.md).
2613

27-
To prevent these conflicts, the [COLOR](COLOR.md) values have had **NP_** prepended to the front of them, to distinguish them from the non-prefixed command names. All other color names remain the same, with only the three colors in conflict having to use **NP_** (for **N**o **P**refix) in front of them.
28-
14+
#### DESCRIPTION
15+
* $[COLOR](./COLOR.md):0 adds constants for the colors 0-15 available in [SCREEN](./SCREEN.md) 0 , these do also match for the first 16 colors on 8-Bit (256 colors) graphic screens as long as they are not changed using [PALETTE](./PALETTE.md) or [_PALETTECOLOR](./_PALETTECOLOR.md) . For the actual constant names see $[COLOR](./COLOR.md):0 Name Table .
16+
* $[COLOR](./COLOR.md):32 adds constants for full 32-Bit color values as used on 32-Bit screens created via [_NEWIMAGE](./_NEWIMAGE.md) , similar to HTML color names. For the actual constant names see $[COLOR](./COLOR.md):32 Name Table .
17+
* Prior to QB64-PE v0.5.0, $[COLOR](./COLOR.md) was not compatible with $NOPREFIX .
18+
* Since QB64-PE v0.5.0, $[COLOR](./COLOR.md) can now be used with $NOPREFIX , with a few notable differences to three conflicting colors -- Red, Green, Blue.
2919

30-
## Examples
3120

32-
Example 1
33-
Adding named color constants for SCREEN 0.
21+
#### EXAMPLES
22+
```vb
23+
$COLOR:0
3424

35-
``` $COLOR:0 [COLOR](COLOR.md) BrightWhite, Red [PRINT](PRINT.md) "Bright white on red."
25+
COLOR BrightWhite, Red
26+
PRINT "Bright white on red."
3627
```
37-
38-
``` Bright white on red.
28+
29+
```vb
30+
Bright white on red.
3931
```
32+
33+
```vb
34+
SCREEN _NEWIMAGE(640, 400, 32)
35+
$COLOR:32
4036

41-
---
42-
43-
Example 2
44-
Adding named color constants for 32-bit modes.
45-
46-
``` [SCREEN](SCREEN.md) [_NEWIMAGE](_NEWIMAGE.md)(640, 400, 32) $COLOR:32 [COLOR](COLOR.md) CrayolaGold, DarkCyan [PRINT](PRINT.md) "CrayolaGold on DarkCyan."
37+
COLOR CrayolaGold, DarkCyan
38+
PRINT "CrayolaGold on DarkCyan."
4739
```
48-
49-
``` CrayolaGold on DarkCyan.
40+
41+
```vb
42+
CrayolaGold on DarkCyan.
5043
```
44+
45+
```vb
46+
$NOPREFIX
5147

52-
---
53-
54-
Example 3
55-
Adding named color constants for 32-bit modes (with $NOPREFIX in effect).
48+
SCREEN NEWIMAGE(640, 400, 32)
49+
$COLOR:32
5650

57-
``` [$NOPREFIX]($NOPREFIX.md) [SCREEN](SCREEN.md) [NEWIMAGE](NEWIMAGE.md)(640, 400, 32) $COLOR:32 [COLOR](COLOR.md) NP_Red, White 'notice the NP_ in front of Red? 'This is to distinguish the color from the command with $NOPREFIX. [PRINT](PRINT.md) "Red on White."
51+
COLOR NP_Red, White 'notice the NP_ in front of Red?
52+
'This is to distinguish the color from the command with $NOPREFIX.
53+
PRINT "Red on White."
5854
```
59-
60-
``` Red on White.
55+
56+
```vb
57+
Red on White.
6158
```
62-
6359

6460

65-
## See also
66-
67-
* [COLOR](COLOR.md)
68-
* [SCREEN](SCREEN.md), [_NEWIMAGE](_NEWIMAGE.md)
69-
* [Metacommand](Metacommand.md)
70-
* [$COLOR:0 Name Table]($COLOR:0 Name Table.md)
71-
* [$COLOR:32 Name Table]($COLOR:32 Name Table.md)
7261

73-
62+
#### SEE ALSO
63+
* [COLOR](./COLOR.md)
64+
* [SCREEN](./SCREEN.md) , [_NEWIMAGE](./_NEWIMAGE.md)
65+
* Metacommand
66+
* $[COLOR](./COLOR.md):0 Name Table
67+
* $[COLOR](./COLOR.md):32 Name Table

0 commit comments

Comments
 (0)