Thursday, June 13, 2019

GoTo Statement Essay Example | Topics and Well Written Essays - 500 words

GoTo Statement - Essay ExampleA goto story is a constituent of some languages like C, C++, COBOL, Pascal, Algol and others, especially of assembly languages. Nevertheless a goto statement is not popular in all higher-level languages of programming. Thus in Java goto statement is a reserved statement at present (Tribble 3).During the period of early stage of structured programming development many experts in computer cognition arrived at a conclusion that in programs it is better to use structured flow-control commands, for example, loops and if-then-else statements rather than a goto statement (Tribble 5). Though there are experts who consider that notwithstanding the fact that goto statement considered harmful, there exist some problems in a great number of programming languages that cant be directly decided without a goto statement, like, for instance, exception handling or breaking out of nested loops (Knuth 268).There are few good uses for a goto statement. It is not uncommon for the class instructor to dislodge goto statements altogether. But the traditional legitimate use for a goto is to allow the programmer to escape from deep nesting when a special case (usually an error) has been encountered. For Pascal programmers, this means that, on rare occasion, you may want to goto the end of a subroutine in order to exit.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.