2

What are the most common applications of each control structure. I am trying to get at a reference along the lines of:

Control Structure  - common application

Conditions         - true / false distinction
Selections         - case differentiation of a few known values
Loops              - writing to / reading from lists
 do while          - unknown number of iterations
 for               - known number of iterations
 foreach           - eliminating errors in the loop house keeping arithmetic
Exceptions         - ...
Continuations      - ...
Jumps              - ...
Chris
  • 2,959
  • 1
  • 30
  • 46
Sebas
  • 411
  • 1
  • 3
  • 10

1 Answers1

0

Check code complete 2 by Steve McConnell. It contains lots of detailed information about all of these, and when to use them.

http://www.amazon.co.uk/Code-Complete-Practical-Handbook-Construction/dp/0735619670

Steve
  • 4,859
  • 5
  • 21
  • 17
  • "eliminating errors in the loop house keeping arithmetic" is a quote form Code Complete. I admit that Steve McConnell inspired me to ask this question. How would the proposed table be improved by Code Complete 2 though? Allowing html-tables on Stackoverflow, a wider site layout, and an exhaustive concordance analysis of imperative source code, would be what I think could make a decent overview out of my proposed juxtaposition – Sebas Mar 04 '10 at 21:09