diff --git a/docs/do.md b/docs/do.md index 5173adfdc..01b5b7a10 100644 --- a/docs/do.md +++ b/docs/do.md @@ -16,7 +16,7 @@ LOOP: REM This loop repeats forever. 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. -###Looping UNTIL +### Looping UNTIL ``` DO @@ -38,7 +38,7 @@ LOOP 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. -####Example using UNTIL +#### Example using UNTIL Example: _Loop until the user press a Key_ ``` @@ -47,7 +47,7 @@ DO LOOP UNTIL INKEY$ <> "" ``` -###Looping WHILE +### Looping WHILE ``` DO @@ -70,7 +70,7 @@ LOOP 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. -####Example using WHILE +#### Example using WHILE Example: _Loop while there is no key pressed_ ``` @@ -79,11 +79,11 @@ DO LOOP WHILE INKEY$ = "" ``` -##Remarks +## Remarks * This statement does not exist in Sinclair Basic. * **WHILE** can also be used with [WHILE ... END WHILE](while.md) loops. -##See Also +## See Also * [IF ... END IF](if.md) * [WHILE ... END WHILE](while.md) * [FOR ... NEXT](for.md) diff --git a/docs/end.md b/docs/end.md index 19cb76b9a..318fe5f12 100644 --- a/docs/end.md +++ b/docs/end.md @@ -15,5 +15,8 @@ PRINT "HELLO WORLD" END 32: REM The value 32 will be returned to the OS ``` -End is also a keyword used to close [scopes](scope.md) in [FUNCTION](function.md) and [SUB](sub.md) +`END` is also a keyword used to close [scopes](scope.md) in [FUNCTION](function.md) and [SUB](sub.md) and compound sentences in [IF](if.md), [WHILE](while.md). + +## See Also + * [STOP](stop.md) diff --git a/docs/stop.md b/docs/stop.md new file mode 100644 index 000000000..8c65e9110 --- /dev/null +++ b/docs/stop.md @@ -0,0 +1,18 @@ +# STOP + + +## Syntax +``` +STOP +``` + +Terminates execution and returns to the Operating System (i.e. to the Sinclair +BASIC interpreter). + +```basic +PRINT "HELLO WORLD" +STOP +``` + +## See Also + * [END](end.md)