Goto

A goto statement is included in a language, primarily, to provide access to the machine code jump instruction (a.k.a. branch or transfer), but due to potential problems with the use of jump semantics, languages have over time been augmented with other flow-control mechanisms intended to replace the need for and use of goto. Many modern languages do not include a goto statement at all. Many languages that include goto, restrict its use in order to limit the problems that its use might incur. Further, as its use is generally considered a poor choice, software developers tend to avoid using it even when using a language that provides it.
In general, use of goto is considered a poor choice as it leads to code with higher cognitive load and more bugs than code that uses more structured flow-control. The use of goto was common in the early days of computing, but via the concerted effort of the structured programming movement in the 1960s and 1970s, that aimed to replace goto with more structured flow-control, its use has declined significantly. None-the-less, goto is still used today, but generally limited to specific scenarios.
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, and iteration are sufficient for any computation that can be performed by a Turing machine, with the caveat that code duplication and additional variables may be required. Provided by Wikipedia
-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8