Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

A question about C indent styles

Name: Anonymous 2016-07-25 7:26

Is there any particular reason why it is so uncommon to put the opening brace of a function on the same line as the function declaration? As in
int main (int argc, char* argv[]) {
/* ... */
return 0;
}

The vast majority of C code examples I've seen put the opening brace on its own line in functions, even when they don't do so for if and while statements and so on. Is there any reason for this apparent inconsistency? Personally, I tend to use the above style for everything - functions, loops, structs, etc. And while that kind of brace style is widespread in K&R/1TBS style, it seems to be almost never used for functions.

Name: Anonymous 2016-07-25 12:04

>>5
Actually you didn't provide proof of that. None whatsoever because it is really, really wrong. Your post is disregarded. Don't like it? Only make posts with substantiated claims next time.....

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List