GOTO statement

views updated

GOTO statement A program statement that causes a jump; it is thus a jump instruction in a high-level language. It causes the normal flow of control to be broken by designating an explicit successor statement, usually identified by a label, e.g.

   GOTO 99

   〈statements〉

99: …

Modern programming practice deprecates the use of GOTO since its use makes programs more difficult to follow, the flow of control being less visibly explicit. GOTO is, however, sometimes unavoidable, particularly in error situations where it is necessary to abort execution of a number of nested loops or procedures, when the language does not provide for exceptions.

More From encyclopedia.com