I am asking this because I have seen places where, whoever coded initially had provided proper comments, but later on modifications were made to the code but the comments were left untouched.  I remember reading somewhere  Don't get suckered in by the comments, debug only code.So is it a good/ relevant/ practical idea that tells the scope of the comments so as to prompt the developer for editing the comment.Your thoughts.
Should code comments have scope?
programming languages;comments
Definitely.  All comments have scope, whether implicit or explicit.  As a general rule, it's helpful to your successors to be reasonably explicit about scope.Vertical space is an inexpensive way to delineate scope.I often try to convey scope when writing comments by either:inserting a linebreak or two before the comment, to keep it visually grouped with the block of code whose behavior it's intended to documentor defining a logical block of code, and adding the comment at the top of that block.In C, #1 would look like:doStuff();doOtherStuff();// comment explaining the intent of the following three linesint i;for(i=0;i<10;++i)    doMoreStuff(i);doOtherStuff();In C, #2 would look like:doStuff();doOtherStuff();{    // comment explaining the intent of the following three lines    int i;    for(i=0;i<10;++i)        doMoreStuff(i);}doOtherStuff();In this second example, the extra curly brackets also help by minimizing the scope of variable i.