| Index: > A B C D E F G H I J K L M N O P Q R S T U V W X Y Z |
|
|||||
| First Prev [ 1 2 ] Next Last |
GOTO is found in FORTRAN, Algol, COBOL, SNOBOL, BASIC, Common Lisp, C, C++, Pascal, Perl and many other languages, particularly assembly languages. In the assembly languages, the GOTO command is usually called BRA (from "branch"), JMP or JUMP, and is often the only way of organizing program flow. However GOTO is not found in all programming languages. In certain languages, such as Java, "goto" is a reserved word. In the parodyIn contemporary usage, parody is a form of satire that imitates another work of art in order to ridicule it. Parody exists in all art media, including literature, music, and cinema. In ancient Greek literature, a parody was a type of poem that imitated an programming language INTERCAL, COME FROM is used instead.
Unlike a function call, a GOTO does not demand any preparation or restructuring of the code. As a result, it becomes very easy to produce inconsistent, incomplete and generally unmaintainable spaghetti codespaghetti looks twisted and tangled, which is where the name for spaghetti code comes from. Spaghetti code is a pejorative term for a computer program code with a complex and tangled control structure, especially one using many GOTOs, exceptions, threads,. Consequently, as structured programmingStructured programming can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms. It is most famous for removing or reducing reliance on the GOTO statement (also known as "go to"). Historically, several dif became more prominent in the 1960sCenturies: 19th century 20th century 21st century Decades: 1900s 1910s 1920s 1930s 1940s 1950s 1960s 1970s 1980s 1990s 2000s 2010s Years: 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 Events and trends The 1960s was a turbulent decade of change around and 1970sMillennia: 1st millennium 2nd millennium 3rd millennium Centuries: 19th century 20th century 21st century Decades: 1920s 1930s 1940s 1950s 1960s 1970s 1980s 1990s 2000s 2010s 2020s Years: 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 Events and trends, numerous computer scientists came to the conclusion that programs should always use the structured flow commands ( loops, if-then statements, etc.) in place of GOTO. However, others believed that even though the use of GOTO is often bad practice, there are some tasks that cannot be straightforwardly accomplished in many programming languages without the use of GOTO statements, such as exception handling.
One famous criticism of GOTO is a letter by Edsger Dijkstra called Go To Statement Considered Harmful (Communications of the ACM 11 (3), 147-148, March 1968). In that letter Dijkstra argued that unrestricted GOTO statements should be abolished from higher-level languages because they complicated the task of analyzing and verifying the correctness of programs (particularly those involving loops). Donald Knuth's Structured Programming with goto Statements (Computing Surveys 6 (4), 261-301, December 1974) considers some of the places where GOTO may be the appropriate tool. Generally these are in situations where a particular programming structure is not available. In these cases, GOTO can generally be used to emulate the desired structure, since it is one of the fundamental building blocks of programming. Another solution to this problem is writing the desired control structure as macro as one can do in almost all Lisp dialects.
There have been several variations on the GOTO statement. In BASIC, the ON GOTO statement selects from a list of different places to jump. It can be thought of as a primitive "switch" statement. The computed GOTO found in Fortran and some BASICs causes a jump to a line number computed by an arithmetic expression. Computed GOTO is often avoided even by programmers who use GOTO, since it makes code even more difficult to read: to determine even the possible destinations of the jump requires evaluating the arithmetic expression that controls it.