Skip to content

Commit 09746e2

Browse files
fix typo
1 parent 82b9b0c commit 09746e2

File tree

1 file changed

+1
-1
lines changed
  • docs/4-language-usage/4-control-structures/3-flow-control

1 file changed

+1
-1
lines changed

docs/4-language-usage/4-control-structures/3-flow-control/g-4310.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
>Code containing gotos is hard to format. Indentation should be used to show logical structure, and gotos have an effect on logical structure. Using indentation to show the logical structure of a goto and its target, however, is difficult or impossible. (...)
99
10-
> Use of gotos is a matter of religion. My dogma is that in modern languages, you can easily replace nine out of ten gotos with equivalent sequential constructs. In these simple cases, you should replace gotos out of habit. In the hard cases, you can still exorcise the goto in nine out of ten cases: You can break the code into smaller routines, use tryfinally, use nested ifs, test and retest a status variable, or restructure a conditional. Eliminating the goto is harder in these cases, but it’s good mental exercise (...).
10+
> Use of gotos is a matter of religion. My dogma is that in modern languages, you can easily replace nine out of ten gotos with equivalent sequential constructs. In these simple cases, you should replace gotos out of habit. In the hard cases, you can still exorcise the goto in nine out of ten cases: You can break the code into smaller routines, use try-finally, use nested ifs, test and retest a status variable, or restructure a conditional. Eliminating the goto is harder in these cases, but it’s good mental exercise (...).
1111
1212
>-- McConnell, Steve C. (2004). _Code Complete. Second Edition_. Microsoft Press.
1313

0 commit comments

Comments
 (0)