void do_something() {
// blah
}
void do_somethingelse()
{
// blah blah
}
void do_something() {
….
}
if(a) {
b();
for(i = 0; i < 20; i++) {
c();
}
d();
} else {
e();
}
if(a)
b()
for(i = 0; i < 20; i++)
c()
d()
else
e()
if(a) { b(); for(i = 0; i < 20; i++) { c(); } d(); } else { e(); }
if(a) { b(); for(i = 0; i < 20; i++) { c(); } d(); } else { e(); }
if(a_fooble) { betray_bars(); for(i = 0; i < 20; i++) corterize_que(); dewinchelate_feebix(); } else error();
Curly braces with regards to indentation and style…
vs
Reason I ask is that in C I've always used the latter method, but in PHP and Perl I often see the first method. I got used to the second as it was easier for me to see the start/end of braces without having to comment (due to indentation).