Re: [Libclc-developers] Re: code layout
Status: Planning
Brought to you by:
augestad
|
From: Nolan S. <imm...@fr...> - 2003-03-09 03:21:54
|
Hallvard B Furuseth wrote: > This is a reply to message > https://sourceforge.net/forum/message.php?msg_id=1917616 > by augestad. > >> [snip] This is my preffered coding style. /* Program description ** max 80 characters wide */ /* function comment goes here */ int func( char *a, int b, double c ) { /* or here, 2 spaces after the longest part of the ** multiline statement. Comment not normaly here ** because it doesnt fit well. */ } char *p; /* * next to variable name, though char * p; might be ok, char* is ** not because there is no such type in my opinion, it is a mod ** qualifier, like unsigned char */ i++; i + 1; i = 1; /* comment */ j = i + 1; /* comment 2 spaces after the longest line in this group */ j > i; j >= i; for ( i = 0; i < j; i++ ) { /* all parts spaced for readability */ } while ( i < j ) { } do { } while ( i < j ); if ( j == 0 || j == 5 ) { } atoi( array[ i + 1 ] ); array[ k + 1 ]; 2 space indents except in aligning multilined statements |