Barr Group TwitterBarr Group Vimeo

Rules:

8.1.a. The comma operator (,) shall not be used within variable declarations.

Example:

char * x, y;   // Was y intended to be a pointer also?	Don’t do this.

Reasoning: The cost of placing each declaration on a line of its own is low. By contrast, the risk that either the compiler or a maintainer will misunderstand your intentions is high.

Enforcement: This rule 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.