next up previous contents index
Next: 5.2.2 Alignment of assignments Up: 5.2 Indentation and spaces Previous: 5.2 Indentation and spaces   Contents   Index

5.2.1 General layout and indentation recommendations

Lines should be limited to a maximum of 101 characters, if anyhow possible. That ensures that an editor window with this width does not wrap or cut lines. The version of the CO5BOLD manual that includes the source code cannot display much more than 100 characters in a line.

The code should be carefully indented. Each indentation level shifts the text by 2 spaces to the right. Tabs should not be used. Special care should be taken for the indentation and alignment of stencil operations of assignments and equations (see below). To have sufficient ``screen estate'' left for these, the recommended indentation amount per level (2 spaces) is rather small. For the same reason, module and subroutine headers should not be indented, even if logically a contained subroutine is a level below the corresponding module.