Open main menu

CDOT Wiki β

Changes

OOP344 - HOTYS - 20102

1,500 bytes added, 15:01, 23 May 2010
Coding Style Rules
[http://zenit.senecac.on.ca/wiki/index.php/OOP344_-_HOTYS_IRC_Logs_-_20102 IRC Page]
==<big>Coding Style Rules</big>==<ppre>To Be Announced Normal 0 false false false EN-CA X-NONE X-NONE MicrosoftInternetExplorer4 Every file should have a function header with: File name Programmer Full name Date last modified   Variable names should be meaningful so additional comments are not necessary to explain what the variable does   A lower case prefix should be fitted to the variable name to help describe it at a glance: n int c character b Boolean f fload d double s C-style null terminated string OR a string object   Ex: nNumOfSignals cCharPassed bIsTrue fLength dWidth sUserInput   There should be NO single character names for variables (Ex: i, j, k, etc) except for arbitrary counters, such as soon for loops       Function names should have meaningful names (they do not require prefix) Each function should have only one point of entry and one point of exit. I.E. There should be only 1 return statement in each function.   Each function should have a header describing what it does.   Use Inline comments to describe hard to read code. All inline code should be set to the same indention as there the code it is consensusdescribing.      Opening braces should be on the same line as the defining function/if/else if/etc statement. Ex: void FunctionOne(int){ if (x > y){ NOT void FunctionOne(int) { if (x > y) {     There should be NO use of the tab character!!Each indent should be 3 blank spaces! I will write a wiki on how to set this up in VS 2008, VS 2010,And Notepad++ </ppre
<br /> <br />
1
edit