编程代码规范包括哪些内容?
互联网开发 583
编程代码规范包括哪些内容?

命名规范
命名是程序规划的核心,类、函数和变量的名字应该总是能够描述让代码阅读者能够容易的知道这些代码的作用。形式越简单、越有规则,就越容易让人感知和理解。应该避免使用模棱两可,晦涩不标准的命名。
书写规范
包括每行字数限制、缩进与换行规则、空格括号使用规则、控制语句和循环语句书写规则、函数声明方式、注释写法等。
语法规范
包括错误处理规范、异常处理措施等。
请在浏览器中启用JavaScript来完成此表单。
( function() {
const style = document.createElement( 'style' );
style.appendChild( document.createTextNode( '#wpforms-17950-field_1-container { position: absolute !important; overflow: hidden !important; display: inline !important; height: 1px !important; width: 1px !important; z-index: -1000 !important; padding: 0 !important; } #wpforms-17950-field_1-container input { visibility: hidden; } #wpforms-conversational-form-page #wpforms-17950-field_1-container label { counter-increment: none; }' ) );
document.head.appendChild( style );
document.currentScript?.remove();
} )();

请输入姓名或昵称
如果您有任何疑问、需要更多信息或希望与我们建立合作请留言
=