Skip to content

Commit 2cf59b7

Browse files
committed
doc: add END doc
1 parent 7ed47fe commit 2cf59b7

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/end.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# END
2+
3+
4+
##Syntax
5+
```
6+
END [<value>]
7+
```
8+
9+
Terminates execution and returns to the Operating System (i.e. to the Sinclair
10+
BASIC interpreter). An optional value can be used (defaults to 0 if not specified)
11+
that will be returned to the OS.
12+
13+
```basic
14+
PRINT "HELLO WORLD"
15+
END 32: REM The value 32 will be returned to the OS
16+
```
17+
18+
End is also a keyword used to close [scopes](scope.md) in [FUNCTION](function.md) and [SUB](sub.md)
19+
and compound sentences in [IF](if.md), [WHILE](while.md).

0 commit comments

Comments
 (0)