Some people who have a good original program will think: As long as the program runs well, there is no matter what the original program is. But absolutely not the case. The software is not finished in one time, it is necessary to make changes, expansion and other management. Therefore, the original procedure should be as easy as possible to understand, and the management is convenient.
In doing so, the first is for software developers, followed by the software performance. Managing inconvenient programs will not make good software.
I hope to learn good program habits through this article. To understand the content of this article, you should know at least 1 development tool language. It is a C language for example, but you don't worry about the C language. The principle described here is not a specific language.
1. The statement is to end thoroughly --- (colon;)
One of the frequent challenges of programmers is to forget to add a colon after the statement is completed. Such problems are not easy to discover, and the programmer is not known when it is. When programming, pay attention to whether each statement ends with a colon, although not all languages ends with a colon. The following is an example of forgetting a colon.
Int main (void)
{
/ * There is no colon, resulting in problems * /
Printf ("Hello World! / N")
Return (0);
}
Many people make such a mistake. Less than a few procedures are not difficult to find such problems, but more than 1,000 procedures? Find that the statement that I forgot to write a colon will not be very easy. Remember, end a statement, must write a colon, just like the end of the general article.
There is also a wrong mist of colon not to write a colon. Experienced programmers see that the following example will feel funny, but the author does have seen a lot of such mistakes.
/ * main () should not write a colon * /
INT Main (int Argc, char * argv []);
{
Printf ("Hello World");
Return (0);
}
The function or Method is not written in the colon.