Barr Group TwitterBarr Group Vimeo

Rules:

3.3.a. No line of code shall contain more than one statement.

3.3.b. There shall be a blank line before and after each natural block of code. Examples of natural blocks of code are loops, if…else and switch statements, and consecutive declarations.

3.3.c. Each source file shall terminate with a comment marking the end of file followed by a blank line.

Example: See Appendix D.

Reasoning: Appropriate placement of white space provides visual separation and thus makes code easier to read and understand, just as the white space areas between paragraphs of this coding standard aid readability. Clearly marking the end of a file is important for human reviewers looking at printouts and the blank line following may be required by some older compilers.

Enforcement: These rules shall be enforced during code reviews.

 

 

 

What’s happening and how it’s done. Get in the know.

Sign Up for Our Newsletter

Receive free how-to articles, industry news, and the latest info on Barr Group webinars and training courses via email. 

To prevent automated spam submissions leave this field empty.