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


当前回答

// barcore.cpp - MFC

//.....
HBRUSH CControlBar::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
    LRESULT lResult;
    if (pWnd->SendChildNotifyLastMsg(&lResult))
        return (HBRUSH)lResult;     // eat it

//......

// Eat it - just like eat this.

其他回答

//open lid


//take sh!t


//close lid

文件打开,数据转储,文件关闭…

我最喜欢的评论是我的一个同性恋朋友说的。他喜欢用VB标记他所有的TODO注释。净,

'TODO: Matt Damon

有时会提供额外的信息,但通常不是这样。

def leppard
# what, i cant have my own convention?
end
switch(value)
{
   [...]
default:
   ASSERT(**true**); // if this is triggered, something really bad is happening.
}
//this is a crap way to do this but I ran out of patience

DelButton.click();