parent
c9108242cd
commit
acdfc94511
@ -1,41 +0,0 @@
|
|||||||
|
|
||||||
This is an attempt to explain my odd programming standard used for this project.
|
|
||||||
Not to defend any of these but it's my default standard and it makes it easy
|
|
||||||
for me to read code.
|
|
||||||
|
|
||||||
Some files break these rules, they will be updated eventually.
|
|
||||||
|
|
||||||
try to make any file compile with c++ compilers
|
|
||||||
|
|
||||||
always put one var on a line by itself
|
|
||||||
char* pvar;
|
|
||||||
char text[256];
|
|
||||||
not
|
|
||||||
char *pvar, text[256];
|
|
||||||
|
|
||||||
function calls look like this
|
|
||||||
foo(a, b, c);
|
|
||||||
not
|
|
||||||
foo ( a, b, c );
|
|
||||||
|
|
||||||
while, if, and case statements look like
|
|
||||||
while (i != 0)
|
|
||||||
not
|
|
||||||
while(i != 0)
|
|
||||||
|
|
||||||
for comments, always use /* */, not //
|
|
||||||
|
|
||||||
defines should always be uppercase
|
|
||||||
|
|
||||||
don't use tabs, use spaces
|
|
||||||
|
|
||||||
no line should exceed 80 chars
|
|
||||||
|
|
||||||
always use {} in if and while, even if it's only one line
|
|
||||||
while (p != 0)
|
|
||||||
{
|
|
||||||
p = p->next;
|
|
||||||
}
|
|
||||||
not
|
|
||||||
while (p != 0)
|
|
||||||
p = p->next;
|
|
Loading…
Reference in new issue