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


当前回答

// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...

其他回答

//Woulda
if(x) {}
//Shoulda
else if(y) {}
//Coulda
else {}

在XSLT文件的头文件中:

DON'T TOUCH THIS SCRIPT -> XSLT is like arcane, black magic
int MyFunction()
{
    // There once was a man named Dave
    int Result = 0;

    // Whose code just wouldn't behave
    MyObject *Ptr = new MyObject();

    // He left to go to a meetin'
    Result = Ptr->DoSomething();

    // And left his memory a leakin'
    return Result;
}

c++怎么样

在eMule, Preferences.cpp中,强制最小上传速度限制与下载速度限制成正比的方法:

uint16 CPreferences::GetMaxDownload(){
//dont be a Lam3r :)
    uint16 maxup=(GetMaxUpload()==UNLIMITED)?GetMaxGraphUploadRate():GetMaxUpload();
    if( maxup < 4 )
        return (( (maxup < 10) && (maxup*3 < prefs->maxdownload) )? maxup*3 : prefs->maxdownload);
    return (( (maxup < 10) && (maxup*4 < prefs->maxdownload) )? maxup*4 : prefs->maxdownload);
}

当我读到这篇关于我负责维护的项目的文章时,我哭了。

//Write Code Here

我仍然畏缩:)