# goto statement

The goto statement transfers control
to the location in the FlashBASIC or BASIC program that begins with
the given statement label.

**Synonyms:** go

On statement labels beginning with a nonnumeric value,
the : following the *statement.label* is optional in the goto, but is required following
the actual statement label.

## Syntax

```
goto statement.label{:}
go to statement.label{:}
```

## Parameter(s)

| statement.label | Specifies the location in a FlashBASIC or BASIC program to which control is transferred. |
| --- | --- |

## Example(s)

```
goto 99
go to error
if ans=’y’ then go begin
```

## See also

- [Branching](https://d3codex.com/definitions/branching/)
- [go command](https://d3codex.com/proc/go-command/)
- [on...goto statement](https://d3codex.com/pickbasic-flashbasic/on-goto-statement/)
- [statement labels](https://d3codex.com/pickbasic-flashbasic/statement-labels/)

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