From 91f1ab5efd091b17187e1e1089784a8b97cac72b Mon Sep 17 00:00:00 2001 From: David Lin Date: Sun, 16 Feb 2020 20:21:33 +0800 Subject: [PATCH] Fixed typo: 'swtich' coding_style_cn.md Note that the word 'swtich' is wrong, so that 'swtich' should been replaced with 'switch'. --- documentation/coding_style_cn.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/coding_style_cn.md b/documentation/coding_style_cn.md index 0aff3cb543..26bed9d045 100644 --- a/documentation/coding_style_cn.md +++ b/documentation/coding_style_cn.md @@ -131,7 +131,7 @@ C语言头文件为了避免多次重复包含,需要定义一个符号。这 } ``` -唯一的例外是 swtich 语句,switch-case 语句采用 case 语句与 swtich 对齐的方式, +唯一的例外是 switch 语句,switch-case 语句采用 case 语句与 switch 对齐的方式, 例如: ```c @@ -173,7 +173,7 @@ case 语句与前面的 switch 语句对齐,后续的语句则采用缩进的 } ``` -建议在括号前留出一个空格(涉及的包括 if、for、while、swtich 语句),而运算表达式 +建议在括号前留出一个空格(涉及的包括 if、for、while、switch 语句),而运算表达式 中,运算符与字符串间留一个空格。另外,不要在括号的表达式两侧留空格,例如: ```c -- GitLab