I've seen this questions here. I'm wondering if there exists an official name for the following indent style:
void fooBar(String s)
{
while (true)
{
// ... do something
}
}
When the opening brace is in the same line as the control statement, the statements within are indented and the closing brace is on the same indentation level as the control statement, the style is called K&R-Style. So is there a name for the indent style for the this code sample above?
Allman style (bsd in Emacs) see wikipedia article http://en.wikipedia.org/wiki/Indent_style
Yep, this is the ANSI style, called this way because it appears in the ANSI C documents. The popular auto-formatting util astyle refers to it as ansi
AFAIK, It's also the one used by default in Visual C++.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With