Tekforums

Chat => Entertainment & Technology => Topic started by: Gaara of the desert on August 02, 2006, 13:17:54 PM

Title: Formatting C code
Post by: Gaara of the desert on August 02, 2006, 13:17:54 PM
Hi there guys,

I have started a new job and I want to put some coding standards into place to ensure that all my staff are writing their code using the same style.  I know this may sound pedandic to many of you, but stragnly enough it is very important in ISO9001 registered compaines.

Do you guys know of any software that I can get that will allow me to run all exsisting code through to neaten it up a bit as some of it is terrible??

Any info on this subject would be a great help.

Many thanks,

Rich
Title: Formatting C code
Post by: cornet on August 04, 2006, 00:45:00 AM
Not sure about windows but for linux there is a program called "indent" which will do that for you. Also many prgramming editors will indent code automatically for you - although some what difficult if people use different editors (and you shouldnt force any programmer to use a specific editor).

Having a stardard format is not perdantic at all its all about creating maintainable, readable code. Create a "coding standards" document that dictates the layout of code and similar things. I hight recommed a book called "The practice of programming" which covers all this sort of stuff.

Cornet