Search code examples
coding-styleindentationbraces

What is the name of this particular indent style? ("braces stacked")


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?


Solution

  • Allman style (bsd in Emacs) see wikipedia article http://en.wikipedia.org/wiki/Indent_style