Coding Conventions
From WinBolo
(Difference between revisions)
(→Method Header Comments) |
(→Single Line Comments) |
||
Line 22: | Line 22: | ||
== Single Line 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. | ||
+ | <pre> | ||
+ | /* This is a comment and will be ignored by the compiler */ | ||
+ | </pre> | ||
== Multiline Comments == | == Multiline Comments == |
Revision as of 21:57, 11 February 2009
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 */