Code written format

xiaoxiao2021-03-06  118

The format of the code is written. 1. BeGin statement must be occupied separately 2. There is no space between the left bracket and the next character, and the right brackets are also without spaces. 3. Reserved words and keywords are always lower than. 4. Case Cheng name should start with uppercase letters, and write interleaves to increase readability 5. The same type of shape should be returned and together 6. All the names of all ginseng should express its use, the name is best to use the letter A Prefix 7. The order in which the friend should consider the register call rule. The most common parameters should be used as the first parameter. According to the left to right, the input parameters are located before the output parameters, the input parameters should be placed in the range. Before the small parameters 8. Generally do not encourage global variables, a global variable may only be in the unit's IMLEMentation section is a global 9. array type name, the record type name should be added to the letter T is a prefix, the pointer type is incorporated with the letter P Prefix 10. In the IF / THEN / ELSE statement, the most likely executed should be placed in the THEN clause, unlikely to put in the else clause 11. If more than 5, do not use the IF statement ( You can use a CASE statement). Do not use excess parentheses in the IF statement. If there are multiple conditions in the IF statement to test, you should follow the right direction from right to right, such as Condition1 is fast, Condition2 is fast than Condition3 If the IF statement should be constructed such that each case in the IF condition1 and condition2 and condition3 THEN12.CASE statements The constants should be arranged in order of numbers or letters, and the ELSE clause of the CASE statement is only used by default or error detection 13. If loop The number of times is determined, and should use the for statement to replace the While (REPEAT) statement 14.with statement should not use multiple objects or records, such as: with record1, record2 do

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

New Post(0)