在对代码块使用“花括号”且不关心空格的语言中(C、Java、PHP) - 不同花括号/缩进样式的名称是什么?
我记得读过有关“KNF”和“Flag”的内容,但如果能拥有最受认可的名称以及每个名称的一些简单示例,那就太好了。
最佳答案
请参阅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.
关于coding-style - C/PHP/Java 等中不同的支撑/缩进样式的名称是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1013966/