What are the names of the different Bracing/Indenting styles in C/PHP/Java etc? [closed]
-
06-07-2019 - |
Question
In languages that use 'curly braces' for code blocks, and where whitespace isn't a concern (C, Java, PHP) - What are the names for the different bracing/indenting styles?
I remember reading about 'KNF' and 'Flag', but it'd be great to have the most recognized names, along with some simple examples of each.
Solution
Please see Indent style:
In computer programming, an indent style is a convention governing the indentation of blocks of code to convey the program's structure. This article largely addresses the C programming language and its descendants, but can be (and frequently is) applied to most other programming languages (especially those in the curly bracket family). Indent style is just one aspect of programming style.