上传者: augustroy
|
上传时间: 2021-08-06 17:26:48
|
文件大小: 843KB
|
文件类型: PDF
华为代码规范,适用 C/C++
1 概述 ................................................................................................................................................................... 5
1.1 编写目的 ........................................................................................................................................... 5
1.2 文档约定 ........................................................................................................................................... 5
1.3 预期的读者和阅读建议 ................................................................................................................... 5
1.4 参考文献 ........................................................................................................................................... 5
2 排版要求 ........................................................................................................................................................... 5
2.1 程序块缩进 ....................................................................................................................................... 5
2.2 程序块之间空行 ............................................................................................................................... 5
2.3 长语句和长表达式 ........................................................................................................................... 6
2.4 循环、判断等长表达式或语句 ....................................................................................................... 7
2.5 长参数 ............................................................................................................................................... 7
2.6 短语句 ............................................................................................................................................... 8
2.7 条件、循环语句 ............................................................................................................................... 8
2.8 语句对齐 ..................................................