GOTO

GoTo is a statement found in many computer programming languages. It performs a one-way transfer of control to another line of code; in contrast a function call normally returns control. The jumped-to locations are usually identified using labels, though some languages use line numbers. At the machine code level, a goto is a form of branch or jump statement, in some cases combined with a stack adjustment. Many languages support the goto statement, and many do not. The structured program theorem proved that the goto statement is not necessary to write programs that can be expressed as flow charts; some combination of the three programming constructs of sequence, selection/choice, and repetition/iteration are sufficient for any computation that can be performed by a Turing machine, with the caveat that code duplication and additional variables may need to be introduced. In the past there was considerable debate in academia and industry on the merits of the use of goto statements.

Read more in the app

New telescope to detect gravitational wave events. The Gravitational-wave Optical Transient Observer (GOTO) will scour the skies for optical clues about the violent cosmic events that create ripples in the fabric of space itself