GoTo

From BR Wiki
Revision as of 12:09, 4 February 2012 by Mikhail.zheleznov (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

GOTO label

The GoTo statement transfers program control to a specified line number or label. The GOTO statement not be executed from the command line. Error 1011 (Illegal immediate statement) will occur if such usage is attempted.

Comments and Examples

The following example transfers control to line number 45:

00320 GOTO 45

In the next example, where the GOTO points to a line label, control is transferred to the first executable statement after the label:

1000 GOTO START

Syntax

File:HELP0086.jpg

Parameters

GOTO has one required parameter: "line-ref". This is the line number or label that program control is to be transferred to.

Technical considerations

  1. See the ON GOTO statement for a method of branching to one of several lines depending on the value of a numeric expression.