你遇到过的源代码中最好的注释是什么?


当前回答

i++; // increment variable i

其他回答

#如你所见:我注释了代码!

//Woulda
if(x) {}
//Shoulda
else if(y) {}
//Coulda
else {}
{
This is a gathering place for all unit tests.
Create a TUnitTestWrapper, then call "RunAllUnitTests".

This class will create an instance of each thing to be tested, and call each of
their unit tests.

It does not really do any testing on it's own; it just gives a common place from
which to call everyone else's tests.

This way, one day, we can automate our testing with each build. [Cue laughter]
}
// THE LOOP THAT DO EVERYTHING!!!!!!!

这比你在许多评论标题中看到的可怕的法律通知和免责声明要好得多。从SQLite。

/*
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
*/