Next: Top-down design Up: Procedures Previous: A warning

Program structure

Now that you know about functions, you should consider all good programs to be collections of functions. Aim to keep each function simple and self-contained. Make each function correspond to an identifiable part of the solution. Minimise the amount of data shared between them. Each section of code should have a single entrance point and a single exit point.




Next: Top-down design Up: Procedures Previous: A warning


maspjw@
Tue Sep 27 15:29:34 BST 1994