# go command

The go command transfers program control
to another Proc statement which starts with a statement label. The
second form is an indirect transfer, according to the value of the
label, as extracted from a parameter in the input buffer.

**Synonyms:** g

## Syntax

```
go statement.label|aparam.num
```

## Parameter(s)

| statement.label | Specifies the statement label to which control is transferred. statement labels must be numeric. |
| --- | --- |
| aparam.num | Specifies an indirect transfer, according to the value of the label, as extracted from a parameter in the currently active input buffer. The a is a literal. |

## Description

If the statement label is not
unique, the go command goes to the first occurrence
of the statement label as it scans from the top. If the label does
not exist, the go command is not executed.

## Example(s)

Transfers control to the Proc
statement with label 99.

```
go 99
```
Transfers control to the Proc label that matches the value
in the fourth position of the currently active input buffer.

```
go a4
```

## See also

- [goto statement](https://d3codex.com/pickbasic-flashbasic/goto-statement/)
- [if command](https://d3codex.com/proc/if-command/)
- [PROC buffers](https://d3codex.com/proc/proc-buffers/)
- [PROC processor](https://d3codex.com/proc/proc-processor/)
- [ri command](https://d3codex.com/proc/ri-command/)
- [PROC buffers](https://d3codex.com/proc/proc-buffers/)
- [sp command](https://d3codex.com/proc/sp-command/)
- [ss command](https://d3codex.com/proc/ss-command/)
- [t command (PROC processor)](https://d3codex.com/proc/t-command-proc-processor/)
- [u01a2 user exit](https://d3codex.com/proc/u01a2-user-exit/)

---
Source: https://d3codex.com/proc/go-command/ - part of the D3Codex reference.
