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

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

First floor vs ground floor, usage origin

usage - "there doesn't seem" vs. "there don't seem"

pronunciation - Where does the intrusive R come from in “warsh”?

Abbreviation of "Street"

etymology - Since when has "a hot minute" meant a long time?

meaning - What is synonyme of "scale"?