9 programming habits of successful software developers (2)

zhaozj2021-02-17  63

2. To properly use spaces and TAB keys C language, it is not distinguished, so the program can also write it all the time, but such a program will not understand "very difficult" program, please see The following example: if (x == 0) {a = b = c = D = max; x ;} This is written, may save space, but not only others, the programming it will be difficult to understand. The program is easy to understand! IF (x == 0) {a = b = c = D = max; x ;} Is this written, do you look clear? The program has to be exact spaces to understand. 3. Uniform use of braces and cut-off mode Each programmer has its own habits using braces ({}) and modified ways, so that when handing over the program to others, there will be confusion. For example, INT MAIN () {int x = 1; int y = 10; While (x

转载请注明原文地址:https://www.9cbs.com/read-29470.html

New Post(0)