Changes

Jump to: navigation, search

OOP344 Temporary

1,078 bytes added, 00:20, 28 October 2009
OOP344 northWind87: Added some more stuff to coding standards, about two-thirds of the way there...
== Coding Standards ==
=== Naming Convention Conventions ===* ''' Camel notation Notation ''' should be used for variable names and function names ** ''' ie ''' myVar, bigInt, getNumber(), myFunction()* Class names should always be first''' First-letter capitalized Letter Capitalized '''** ''' ie ''' TestClass, DynamicStack, PeanutButter, Hammer* Compiler directives should always be written in all lowercase ''' All Lowercase '''** ''' ie ''' #define, #ifndef* Compiler definitions should be all uppercase ''' All Uppercase ''' and should only use underscore where a gap is required ** ''' ie ''' IO_CTL_LARGEFILE, SOME_DEFINITION* Header file defines should be preceeded and followed with two underscores ''' Two Underscores '''** ''' ie ''' __CIOL_H__, __IO_FORM_H__* Finally, <code>void</code> should always be explicitly declared.** ''' ie ''' void doStuff(void), int getInt(void) === Statement Notation ===The first left parenthesis on a function declaration should open immediately after the function name while the first left parenthesis on a loop declaration should open one space after the loop declaration.<br />''' ie Functions: '''<pre>int hello(char goodbye(void getQuestion(</pre> ''' ie Loops: '''<pre>while (for (do (</pre>
=== Code Blocks ===
Both function blocks and loop blocks should open on the same line as the declaration statement preceeding them; however, function blocks should open immediately after the last right parenthesis while loop blocks should open one space after the last right parenthesis...incomplete...<br />''' ie Functions: '''<pre>int hello(){char goodbye(){void getQuestion(void){</pre> ''' ie Loops: '''<pre>while (var < 15) {for (int i = 0; i < 15; i++) {do (blah) {</pre>
== Announcements ==

Navigation menu