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

Popular posts from this blog

commas - Does this sentence have too many subjunctives?

verbs - "Baby is creeping" vs. "baby is crawling" in AmE

time - English notation for hour, minutes and seconds

etymology - Origin of "s--t eating grin"

grammatical number - Use of lone apostrophe for plural?

etymology - Where does the phrase "doctored" originate?

single word requests - What do you call hypothetical inhabitants living on the Moon?