Layout and Style

xiaoxiao2021-03-06  86

Objective of good layout1. Accurately represent The logical structure of the code. Consistently represent The logical structure of the code.3. Improve Readability4. Withstand modifications.

Guidelines about control-structure blocks:..... 1 Avoid unindented begin-end pairs.2 Avoid double indentation with begin and end.3 Use blank lines between paragraphs.4 Format single-statement blocks consistently.5 For complicated expressions, put Separate Conditions on Separate Lines.6. No endline exceptions for copy statement.7. Using Only One Statement Per Line.

Laying Out Comments1. Indent a comment with it.2.Set off off offs the at Least One Blank Line

Laying out routines.1. Use blank lines to sedate Parts of a routine.2. Use standard indeentation for routine arguments.

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

New Post(0)