Coding Conventions

From WinBolo

Revision as of 21:57, 11 February 2009 by Sticks (Talk | contribs)
Jump to: navigation, search

Contents

Comments

Method Header Comments

This should go above every method, both it's implementation (in .c files) and definition (in .h files).

/*********************************************************
*NAME:          <functionName>
*AUTHOR:        <functionAuthor>
*CREATION DATE: <DD/MM/YY>
*LAST MODIFIED: <DD/MM/YY>
*PURPOSE:
*  Short description of function goes here
*
*ARGUMENTS:
*  firstParameter  - Short explanation of what this parameter is
*  secondParameter - Short explanation of what this parameter is
*********************************************************/

File Header Comments

Single Line Comments

As this code is trying to be 100% ANSI C compliant, you [b]must[/b] use a forward slash immediately followed by an asterisk to start the comment and then an asterisk and forward slash to close the comment.

/* This is a comment and will be ignored by the compiler */

Multiline Comments

Variable Cases

Indentions

Conditionals

Methods

Personal tools