guides:programstyle:whitespace
This is an old revision of the document!
Table of Contents
Use of Whitespace in Programs
Whitespace is a character or set of characters that produce “space” in a text file. Generally whitespace is generated by three keys, the spacebar, the tab key, and the enter key.
The appropriate use of whitespace characters greatly enhances the readability of code.
Short Answer
- Do not use tabs
- One statement per line
- One line per statement in most cases.
- Use blank lines to separate sections of code.
- Consistently use a single style for brace placement.
- Place spaces between operators in statements.
- Do not exceed 80 characters for any line.
- Follow the indentation guidelines.
Discussion
Do not use tabs
One statement per line
One line per statement in most cases.
Use blank lines to separate sections of code.
Consistently use a single style for brace placement.
Place spaces between operators in statements.
Do not exceed 80 characters for any line.
guides/programstyle/whitespace.1595603637.txt.gz · Last modified: 2024/07/25 15:01 (external edit)