General Coding Standards › Common Source File Coding Standards › Formatting Source Code
Formatting Source Code
On modern computers, most source is edited at a workstation display. This means that source should be formatted to be as readable as possible when viewed through the small (24 x 80) window of a workstation.
When you are formatting source code:
- Do not use an excessive number of blank lines
- Keep within 79 columns per line (71 for CLP, PL/1 and CMD source), so that there is no need to window to read source
- Do not leave obsolete source lines ‘commented out’; delete them. Where you must leave an obsolete source line, use several asterisks to help highlight the fact that it is a comment line: it is easy to fail to notice that an executable source line has been made into a comment. For example, it is easy not to notice that the Z-ADD statement in the following line has been commented out:

The following would be slightly better:

- Use section divider comments to mark off sections of source (see below).