Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Algorithm
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Structured programming === Per the [[Church–Turing thesis]], any algorithm can be computed by any [[Turing complete]] model. Turing completeness only requires four instruction types—conditional GOTO, unconditional GOTO, assignment, HALT. However, Kemeny and Kurtz observe that, while "undisciplined" use of unconditional GOTOs and conditional IF-THEN GOTOs can result in "[[spaghetti code]]", a programmer can write structured programs using only these instructions; on the other hand "it is also possible, and not too hard, to write badly structured programs in a structured language".<ref>[[John G. Kemeny]] and [[Thomas E. Kurtz]] 1985 ''Back to Basic: The History, Corruption, and Future of the Language'', Addison-Wesley Publishing Company, Inc. Reading, MA, {{ISBN|0-201-13433-0}}.</ref> Tausworthe augments the three [[Structured program theorem|Böhm-Jacopini canonical structures]]:<ref>Tausworthe 1977:101</ref> SEQUENCE, IF-THEN-ELSE, and WHILE-DO, with two more: DO-WHILE and CASE.<ref>Tausworthe 1977:142</ref> An additional benefit of a structured program is that it lends itself to [[proof of correctness|proofs of correctnes]]s using [[mathematical induction]].<ref>Knuth 1973 section 1.2.1, expanded by Tausworthe 1977 at pages 100ff and Chapter 9.1</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)