|Ada 95 Quality and Style Guide||Chapter 2|
2.1.9 Source Code Line Length
Adhere to a maximum line length limit for source code (Nissen and Wallis 1984, §2.3).
Specifically, it is recommended that you:
- Limit source code line lengths to a maximum of 72 characters.
When Ada code is ported from one system to another, there may be restrictions on the record size of source line statements, possibly for one of the following reasons: some operating systems may not support variable length records for tape I/O, or some printers and terminals support an 80-character line width with no line-wrap. See further rationale in the note for Guideline 7.1.2.
Source code must sometimes be published for various reasons, and letter-size paper is not as forgiving as a computer listing in terms of the number of usable columns.
In addition, there are human limitations in the width of the field of view for understanding at the level required for reading source code. These limitations correspond roughly to the 70- to 80-column range.
An alternate instantiation is to limit source code length to 79 characters. The 79-character limit differentiates the code from the FORTRAN 72-character limit. It also avoids problems with 80-character width terminals where the character in the last column may not print correctly.
The guidelines in this section are easily enforced with an automatic code formatter.
|< Previous Page||Search||Contents||Index||Next Page >|