Revision: 497
http://svn.sourceforge.net/opengate/?rev=497&view=rev
Author: egore
Date: 2007-05-20 14:25:56 -0700 (Sun, 20 May 2007)
Log Message:
-----------
outdated, will be updated soon
Modified Paths:
--------------
trunk/doc/coding-style.txt
Modified: trunk/doc/coding-style.txt
===================================================================
--- trunk/doc/coding-style.txt 2007-05-20 20:55:35 UTC (rev 496)
+++ trunk/doc/coding-style.txt 2007-05-20 21:25:56 UTC (rev 497)
@@ -29,9 +29,37 @@
This is way better. So: always use braces to show where a block of code begins
and where it ends.
+2.) use tabs instead of spaces where usefull
-2.) document the tricky parts
+It's good style to use tabs for most indentions. Especially it is helpfull to
+use tabs at the beginning of each line. For example
+void main() {
+ return;
+}
+
+is a bad one, while this
+
+void main() {
+ return;
+}
+
+is a good one. You don't need to follow the rule preciseley, but that way
+everyone can indent the code as he likes. To don't mess up formatting we
+recommend to use spaces for indention that needs to be fixed. The example
+
+void main(int a, int b, int c, int d, int e,
+ int f, int g) {
+ return;
+}
+
+shows that the line "int f, ..." start with spaces. That way the command
+arguments are placed exactly where they are now. If you have a tab in front
+of you funtion, add the tab in the next line and then start with spaces.
+
+
+3.) document the tricky parts
+
I'll be reviewing the code that will be added to the repository. If it does
something tricky, comment on it. Tell why you have done it this way. Tell how
it works in a few sentences. I'll not tolerate code that is doing "magic". I
@@ -39,7 +67,7 @@
the game... unless it is documented.
-3.) use doxygen
+4.) use doxygen
I recommend documenting the source using doxygen. I know, it's bloating the
code and might even be annoying, but: It will help others, like me :-) So I
@@ -49,7 +77,7 @@
[1] http://www.stack.nl/~dimitri/doxygen/docblocks.html
[2] http://www.stack.nl/~dimitri/doxygen/commands.html
-4.) code example
+5.) code example
class Test {
public:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|