meaning - When I say "comment out", does it mean to uncomment something or comment it?
When I say "comment out", does it mean to uncomment something or comment it?
What is better, or more correctly used?
PS: I'm talking about source code.
Answer
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.
Comments
Post a Comment