Control-Straightline Code

xiaoxiao2021-03-06  69

Statement that must be in a specific order1. Organize code so that dependencies are obvious.2. Name routines so that dependencies are obvious.3. Use routine parameters to make dependencies obvious.4. Document unclear dependencies with comments.5. Check for dependencies With assertions or error-handling code.

STATMENTS whose order doesn't matter.1. Making code read from top to bottom.2. Grouping related statments.

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

New Post(0)