Laying Out Routines
Routines are composed of individual statements, data, control structures, comments— all the things discussed in the other parts of the chapter. This section provides layout guidelines unique to routines.
Cross-Reference
For details on documenting routines, see "Commenting Routines" in Commenting Techniques. For details on the process of writing a routine, see Constructing Routines by Using the PPP. For a discussion of the differences between good and bad routines, see Chapter 7.
Use blank lines to separate parts of a routine. Use blank lines between the routine header, its data and named-constant declarations (if any), and its body.
Use standard indentation for routine arguments. The options with routine-header layout are about ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access