It is even more difficult to penetrate code written by someone else. Until you have experienced the joy of modifying someone else's poorly written code you will probably not appreciate the value of paying careful attention to writing code that not only performs the task it is supposed to, but also does it in a clear and understandable way. In the meanwhile, follow the guidelines we have given here because there is a substantial penalty if you do not. Functions A. Naming Functions Functions are a mixed bag. A function that returns a Boolean value can often be named by the question that it answers.
Some examples follow.
These are not the only possibilities, but should give you an idea of what we expect. B. Prologs for Functions Functions should also have prologs after their header statements. Function prologs should include a list of formal parameters. This function calculates the metric equivalent in centimeters of the values in the variable feet and inches. The prolog should be set off by a blank line above and below.