Yes and no...
If your familar with the program "indent", there are "common styles",
but as others have stated, there are no standard for everyone.
The "common styles" listed in "man indent" are:
GNU
Kerningham & Richie (damn good book by them if you dont have it)
Berkeley
I'd start by looking at those if your going for a "more common" style,
but then again, styles are a very individual thing, I personally don't
like any of those, so I use my own style, *shrug* all personal
preference.
But hey, this gives you a place to start.
On Fri, 2002-08-30 at 06:33, dat one guy wrote:
> Hello all,
>
> I was working with a few snippets and come to wonder something, is there some
> sort of standard C coding style? I mean, like where to put the { in a
> function,
> I put it after the function header, but some others put it on the same line
> ie
> void blah ( void)
> {
> ...
> }
> void blah (void) {
> ...
> }
> Same with if..else statements. Also, tabs vs spaces, and how many? 2? 4? 8?
> Also, is there some sort of standard naming convention for variables and such?
>
> I mean, none of this is really a big deal, it all comes out the same, I know.
>
> Thanks for any info, and this is not meant to be a put down to how people
> write
> code, to each his own, but I was just wondering...
>
> -Xanth
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>