Log in / create account | Login with OpenID
DocForge
Programmer's Wiki

Whitespace

From DocForge

Whitespace is the emptiness around source code, usually implemented with newline, tab and space characters. While documents are typically printed or written on white paper, computer displays and other electronics may render the background as any color.

In free-form programming languages, whitespace characters are ignored by compilers and interpreters, serving only to help organize source code. For example, tab or space characters can show a hierarchical relationship between lines by indenting them by different amounts, such as nested loops.

In non-free-form programming languages, such as Python, whitespace characters are used to determine blocks of code by the compiler. The code of a function or a loop is indented further with whitespace and not delimited with keywords or other characters.