coding-style - C/PHP/Java 等中不同的支撑/缩进样式的名称是什么?

标签 coding-style indentation curly-braces

在对代码块使用“花括号”且不关心空格的语言中(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/

相关文章:

c# - 编写此 C# 循环代码的更优雅方式?

pug - Sublime 自动缩进子项

unicode - 所有 Unicode 左括号/右括号的列表

Eclipse 代码样式格式化程序 : How to keep closing braces of initializer list in seperate line?

c++ - 仅当当前行溢出 clang 格式时才在新行上加括号

c# - 使用对象初始化器时修复缩进

c# - 全局按钮的动态样式,每个按钮都有不同的图像

c++ - 如何获取 std::vector 的迭代器的索引?

python - emacs 根据文件中已有的内容使用不同的缩进

python - python 中出现意外的缩进错误,但仅在组合两个其他工作语句时出现