What I do: If 'if' block is short, just put '{' at the end of the line to save space. Otherwise, start '{' from a new line to get better readability. if( ... ) { . . . } if (... && ...) { ... }
k*c
4 楼
better be consistent.
【在 T***B 的大作中提到】 : What I do: : If 'if' block is short, just put '{' at the end of the line to save space. : Otherwise, start '{' from a new line to get better readability. : if( ... ) { : . . . : } : if (... && : ...) : { : ...