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


当前回答

#define SHIT_HAPPENED (BASE + 1)   /* generic shit happened */

其他回答

// This condition can't happen. Call the police or something.
// Hard to explain

它最后也坏了。难怪很难解释清楚

// I know the line below is wrong, but it came that way from our IP vendor, and 
// the driver won't work if you "fix" it. I've had to revert this change 4 times
// now. Leave it alone, or I will hunt you down and hurt you
if (r = 0) {
    /* bunch of code here */
}
else
{
   /* even more code here */
}
//Woulda
if(x) {}
//Shoulda
else if(y) {}
//Coulda
else {}

这是在PHP代码中找到的

$s=2; // chicken and bacon wrap for lunch

多么有用,幸运的是$s是不言自明的