What is this special indentation style called? ("brackets are folded")

I saw these questions here . I am wondering if there is an official name for the following indentation style:

void fooBar(String s) { while (true) { // ... do something } } 

When the opening curly brace is on the same line as the control statement, instructions are inserted inside and the final curly bracket is at the same level of indentation as the control statement, the style is called K & R-Style. So, is there a name for the indentation style for this code example above?

+6
coding-style indentation braces
source share
4 answers

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

+13
source share

Yes, this is the ANSI style, which is called that because it appears in ANSI C documents. The popular astyle auto-formatting function refers to it as ansi

AFAIK, also the one used by default in Visual C ++.

+3
source share

It is called KNF or the normal form of the nucleus. More information can be found in man 9 style .

-one
source share

It should be called WSRE (Screen Scrap).

-7
source share

All Articles