Skip to content

Commit 9d6257b

Browse files
authored
Merge pull request #958 from boriel-basic/docs
doc: add STOP keyword
2 parents 3c5bdaf + da7c11e commit 9d6257b

File tree

3 files changed

+28
-7
lines changed

3 files changed

+28
-7
lines changed

docs/do.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ LOOP: REM This loop repeats forever.
1616

1717
This form **loops forever**. It's better to use this form instead of using **STEP** 0 in a **FOR** loop, or a **WHILE** 1 condition loop. The generated code is more efficient.
1818

19-
###Looping UNTIL
19+
### Looping UNTIL
2020

2121
```
2222
DO
@@ -38,7 +38,7 @@ LOOP
3838

3939
In this case, the condition is checked first, and the program won't enter to the inner _sentences_ if the condition is not satisfied at first.
4040

41-
####Example using UNTIL
41+
#### Example using UNTIL
4242
Example: _Loop until the user press a Key_
4343

4444
```
@@ -47,7 +47,7 @@ DO LOOP UNTIL INKEY$ <> ""
4747
```
4848

4949

50-
###Looping WHILE
50+
### Looping WHILE
5151

5252
```
5353
DO
@@ -70,7 +70,7 @@ LOOP
7070

7171
In this case, the condition is checked first, and the program won't enter to the inner _sentences_ if the condition is not satisfied at first.
7272

73-
####Example using WHILE
73+
#### Example using WHILE
7474
Example: _Loop while there is no key pressed_
7575

7676
```
@@ -79,11 +79,11 @@ DO LOOP WHILE INKEY$ = ""
7979
```
8080

8181

82-
##Remarks
82+
## Remarks
8383
* This statement does not exist in Sinclair Basic.
8484
* **WHILE** can also be used with [WHILE ... END WHILE](while.md) loops.
8585

86-
##See Also
86+
## See Also
8787
* [IF ... END IF](if.md)
8888
* [WHILE ... END WHILE](while.md)
8989
* [FOR ... NEXT](for.md)

docs/end.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@ PRINT "HELLO WORLD"
1515
END 32: REM The value 32 will be returned to the OS
1616
```
1717

18-
End is also a keyword used to close [scopes](scope.md) in [FUNCTION](function.md) and [SUB](sub.md)
18+
`END` is also a keyword used to close [scopes](scope.md) in [FUNCTION](function.md) and [SUB](sub.md)
1919
and compound sentences in [IF](if.md), [WHILE](while.md).
20+
21+
## See Also
22+
* [STOP](stop.md)

docs/stop.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# STOP
2+
3+
4+
## Syntax
5+
```
6+
STOP
7+
```
8+
9+
Terminates execution and returns to the Operating System (i.e. to the Sinclair
10+
BASIC interpreter).
11+
12+
```basic
13+
PRINT "HELLO WORLD"
14+
STOP
15+
```
16+
17+
## See Also
18+
* [END](end.md)

0 commit comments

Comments
 (0)