Key Points

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

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.73.127