Home - INTROSETERM2/SourceCodes GitHub Wiki

Welcome to the SourceCodes wiki!

Indentation

Proper and consistent indentation is important in producing easy to read and maintainable programs. Indentation should be used to:

• Emphasize the body of a control statement such as a loop or a select statement • Emphasize the body of a conditional statement

• Emphasize a new scope block

A minimum of 3 spaces shall be used to indent. Generally, indenting by three or four spaces is considered to be adequate. Once the programmer chooses the number of spaces to indent by, then it is important that this indentation amount be consistently applied throughout the program. Tabs shall not be used for indentation purposes.

Inline Comments

Inline comments explaining the functioning of the subroutine or key aspects of the algorithm shall be frequently used. See section 4.0 for guidance on the usage of inline comments.

FROM: http://www.nws.noaa.gov/oh/hrl/developers_docs/General_Software_Standards.pdf