每个控制结构最常见的应用是什么。我正在尝试通过以下方式获得参考:

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              - ...

最佳答案

由史蒂夫·麦康奈尔检查代码是否完整2。它包含许多有关所有这些以及何时使用它们的详细信息。

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

10-08 20:08