[chbot] C Coding Style

Richard Jones richard.jones.1952 at gmail.com
Wed Sep 21 11:47:06 BST 2016


The topic of 'C' coding style came up today. At the risk of sounding like a
troll I thought I would ask if people have a favourite 'C' style guide?

Some may ask why have a style guide? My answer would be to make the code
easier and quicker to understand, and less prone to the introduction of
errors during maintenance by others or even the original author.

I had a quick look around a few style guides for 'C' and liked Linus on the
kernel coding style. The document is reasonably brief for a complex topic,
educational and believe it or not amusing in parts. However it is
definitely not for a beginner.

https://www.kernel.org/doc/Documentation/CodingStyle

This one is really brief:

https://www.arduino.cc/en/Reference/StyleGuide

Offers anyone?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ourshack.com/pipermail/chchrobotics/attachments/20160921/a83e13cf/attachment-0001.html>


More information about the Chchrobotics mailing list