Help


from Wikipedia
« »  
Structured programming, canonical structures: Per the Church-Turing thesis any algorithm can be computed by a model known to be Turing complete, and per Minsky's demonstrations Turing completeness requires only four instruction types — conditional GOTO, unconditional GOTO, assignment, HALT.
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 these instructions ; on the other hand " it is also possible, and not too hard, to write badly structured programs in a structured language ".
Tausworthe augments the three Böhm-Jacopini canonical structures: SEQUENCE, IF-THEN-ELSE, and WHILE-DO, with two more: DO-WHILE and CASE.
An additional benefit of a structured program will be one that lends itself to proofs of correctness using mathematical induction.

1.951 seconds.