We list here the main differences between our coding conventions and those you will observe in the current text for the course. You should follow the style you will see used consistently in all the instructor-supplied code on the course website.

  1. Our indentation level is 4 spaces, as opposed to the 3 used by the text.
  2. We generally omit the single space immediately following the // double slashes that start a single-line comment.
  3. We generally omit the // end whatever kind of comment that often follows the closing right brace of a construct such as a loop body or the body of a function defintion.
  4. In formatting a function header, we place both the left and right parenthesis following the function name on a separate line, unless the parameter list is empty. And we place each parameter on a line by itself, with a following comment indicating the direction of data flow for that parameter.
  5. Probably more to come ...