# statement blocks

A statement block is one or more statements that follow
a BASIC decision-path related token such as, but not limited to, then, else, locked, and onerr.

## Syntax

```
[am|;] statement{[am|;] statement...} end
statement{; statement...}
```

## Description

`am` represents
an attribute mark and is interchangeable with the `;` (semicolon).

## Example(s)

```
readt tape.rec then
crt "grabbed record"
.
.
end
```
This is the same as:

```
readt tape.rec then ; crt "grabbed record" ; . ; .
```
In the single-line form, end is not
allowed.

```
readt tape.rec onerr crt "error code: " : system(0) ; stop
```

## See also

- [else clause](https://d3codex.com/pickbasic-flashbasic/else-clause/)
- [get statement](https://d3codex.com/pickbasic-flashbasic/get-statement/)
- [if statement](https://d3codex.com/pickbasic-flashbasic/if-statement/)
- [ifr statement](https://d3codex.com/pickbasic-flashbasic/ifr-statement/)
- [$chain directive](https://d3codex.com/pickbasic-flashbasic/dollar-chain-directive/)
- [input statement](https://d3codex.com/pickbasic-flashbasic/input-statement/)
- [locate statement](https://d3codex.com/pickbasic-flashbasic/locate-statement/)
- [lock statement](https://d3codex.com/pickbasic-flashbasic/lock-statement/)
- [locked clause](https://d3codex.com/pickbasic-flashbasic/locked-clause/)
- [matread statement](https://d3codex.com/pickbasic-flashbasic/matread-statement/)
- [onerr clause](https://d3codex.com/pickbasic-flashbasic/onerr-clause/)
- [open statement](https://d3codex.com/pickbasic-flashbasic/open-statement/)
- [procread statement](https://d3codex.com/pickbasic-flashbasic/procread-statement/)
- [read statement](https://d3codex.com/pickbasic-flashbasic/read-statement/)
- [readnext statement](https://d3codex.com/pickbasic-flashbasic/readnext-statement/)
- [readt statement](https://d3codex.com/pickbasic-flashbasic/readt-statement/)
- [readtx statement](https://d3codex.com/pickbasic-flashbasic/readtx-statement/)
- [readv statement](https://d3codex.com/pickbasic-flashbasic/readv-statement/)
- [rewind statement](https://d3codex.com/pickbasic-flashbasic/rewind-statement/)
- [root statement](https://d3codex.com/pickbasic-flashbasic/root-statement/)
- [send statement](https://d3codex.com/pickbasic-flashbasic/send-statement/)
- [then/else statement blocks](https://d3codex.com/pickbasic-flashbasic/then-else-statement-blocks/)
- [weof statement](https://d3codex.com/pickbasic-flashbasic/weof-statement/)
- [writet statement](https://d3codex.com/pickbasic-flashbasic/writet-statement/)

---
Source: https://d3codex.com/pickbasic-flashbasic/statement-blocks/ - part of the D3Codex reference.
