Key Points

 < Free Open Study > 

  • For simple if-else statements, pay attention to the order of the if and else clauses, especially if they process a lot of errors. Make sure the nominal case is clear.

  • For if-then-else chains and case statements, choose an order that maximizes read-ability.

  • To trap errors, use the default clause in a case statement or the last else in a chain of if-then-else statements.

  • All control constructs are not created equal. Choose the control construct that's most appropriate for each section of code.

 < Free Open Study > 


Code Complete
Code Complete: A Practical Handbook of Software Construction, Second Edition
ISBN: 0735619670
EAN: 2147483647
Year: 2003
Pages: 334

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net