Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/do.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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_

```
Expand All @@ -47,7 +47,7 @@ DO LOOP UNTIL INKEY$ <> ""
```


###Looping WHILE
### Looping WHILE

```
DO
Expand All @@ -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_

```
Expand All @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion docs/end.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
18 changes: 18 additions & 0 deletions docs/stop.md
Original file line number Diff line number Diff line change
@@ -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)