|
|
|
|
|
by Seth_Kriticos
5700 days ago
|
|
Um, no, K&R braces after function declaration are in the next line, because they are special. Braces after if, for, while, switch, etc. are on the same line, and yes, it was to save space on the 80x24 screen. Get a copy of "The C Programming Language, Second Edition". It's right in there. It's the only technical computer book I know that is still accurate after more than twenty years. I also recommend reading the Linux kernel style guide http://www.kernel.org/doc/Documentation/CodingStyle . It's fun to read and has some good points. Sticks quite close to K&R. |
|
> ... if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program.
Uh oh, four indentation levels!