Comment (computing)
In computing, a comment is information in a file that is generally ignored but may be be helpful to human users of the file. The structure, scope and processing applied to this information depends on the syntax and conventions of used to describe the information contained in the file.
A common occurrence are the comments that appear in the source code of a program. In this case the syntax of the programming language specifies the form that comments can take. Such comments could be said to be computer programming comments.
Another common usage are the comments that appear in an initialization or configuration file.
Word processors often support an option that enables writers of documents to effectively write notes to themselves about the material they are writing. These notes are are not visible to a reader of the document unless explicitly asked for.
Commenting out
While debugging a program, programmers will sometimes bracket a code snippet so that it will not be executed when the program is run. This is called commenting out the code.
In some cases the code is commented out by using a language construct that ensures it is never executed. For instance, a conditional statement that is always false.
See also
- Comment (computer programming)
- Docstring, a specific type of comment that is parsed and retained throughout the runtime of the program