basic.on.goto Statement/BASIC Program

basic.on.goto

Command basic.on.goto Statement/BASIC Program
Applicable release versions: AP, R83
Category BASIC Program (486)
Description transfers control to the line within the Pick/BASIC program which begins with the specified statement label, according to the positional value of the index expression referenced by "index.expression". The syntax also allows being specified as "on ... go to ..." (it allows a space between "go" and "to").

The "on ... goto" is identical to the "on ... gosub", except there is no "return" required.
Syntax on index.expression goto statement.label{, statement.label...}

on index.expression goto statement.label,...,
statement.label,
statement.label
Options
Example
on response goto 100,200,300,400,500 

This is an indexed branch in the single-line format.

on response goto 100,200,300,
          400,500,600,
          700,800,900

This is an indexed branch in multi-line format.
Purpose
Related basic.statements
basic.go.to
basic.statement.labels
basic.on.gosub
ue.01bc
ue.01a2