Goto

"'''GOTO'''" key on the 1982 [[ZX Spectrum In computer programming, goto is a control flow statement that transfers control to another line of source code. Unlike a function call that supports returning to the point of call, goto does not. The statement is denoted differently by programming language; sometimes as lower case (), upper case () or case-insensitive, and sometimes as a single word or as two (i.e. ).

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
Showing 1 - 8 results of 8 for search 'Goto', query time: 0.04s Refine Results
  1. 1
    by Goto
    Published 2003
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
Search Tools: RSS Feed Email Search