Differences between version 4 and predecessor to the previous major change of GoTo.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 4 | Last edited on Tuesday, November 11, 2003 4:47:13 pm | by AristotlePagaltzis | Revert |
Older page: | version 2 | Last edited on Friday, October 24, 2003 9:59:06 am | by StuartYeates | Revert |
@@ -1,5 +1,7 @@
-A statement in many ProgrammingLanguages
which causes an unconditional branch to an arbitary point in the current function or method. In a host of early [BASIC] dialects, it was the only control structure available besides ''if'' statements.
+A statement in many [ProgrammingLanguage]s
which causes an unconditional branch to an arbitary point in the current function or method. In a host of early [BASIC] dialects, it was the only control structure available besides ''if'' statements.
Despite being maligned in general use, GoTo is still the best way to describe [FiniteStateMachine]s such as parsers in these languages.
+
+It's also used in C programming a lot to provide something resembling "exceptions", particularly "finally" clauses. You often see "goto out" and then out is a label just before the final return.
See GoToStatementConsideredHarmful