* * Software company Software Development specification
(Trial Version)
In the case of collaborative development of the company team, one important aspect that should be emphasized in programming is the readability of the program, which makes it easy for other programmers to read your program when the performance indicators such as the speed of the software can meet the needs of the users. A clear set of programming style, so that collaborators, successors and themselves at a glance, in a very short period of time to see the structure of the program, understanding the design of ideas. Greatly improve the readability, reusability, program robustness, portability and maintainability of the code.
The purpose of this programming specification is to improve the software development efficiency of the company and the maintainability of the software developed, and to improve the quality of the software. This specification is composed of program style, naming rules, annotation specification, program robustness, portability, error handling and modular specification of software.
First, the procedure style:
1, the strict use of ladder-level organization program code:
The indentation of each level of the grid using the default style of VC, that is, each level indented to 4 square brackets in the next line. A matching brace is required in the same column, and the following line requires a further indent of 4 cells. For example:
void main()
{
......
long lI; //循环变量
long lSum;//用来记录和
float fAvg;//用来求平均值
......
//对数进行累加。
for( lI=0;lI<10;lI++)
{
lSum=lSum+lI;
...... }
//求平均值。
fAvg=lSum/10.0;
......
}
2, the location of the hint information string
The prompt string to be given in the program, in order to support the development of multiple languages, except for some temporary information for debugging, all other information must be defined in the resource.
3, the definition of the variable, as far as possible at the beginning of the function position.