When I say "comment out", does it mean to uncomment something or comment it?
When I say I commented out a line written in a programming language, does that mean I uncommented that line or that I made it a comment?
To comment out is to render a block of code inert by turning it into a comment.
In C# code for example, commenting out code is done by putting //
at the start of a line, or surrounding the code with /*
and */
. Here the line inside the loop is commented out:
for (int i = 0; i < 10; i++) {
//Console.WriteLine(i);
}
To uncomment something means to remove the characters that makes it a comment. The expression only makes sense if the comment contains something that would work as code, usually something that was commented out earlier. To uncomment a regular comment would just cause a syntax error.
"Comment out" means to use comment syntax to remove something from the parsed code. "Uncomment" is the reverse operation. They are both the correct expression for their respective referents.