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


当前回答

在一个著名的商业DOS电子表格应用程序中:

/* This comment was just added in order to check-in a file that was last 
checked in by [Insert Programmer FirstName] "Back-to-the-Future" [Insert 
Programmer LastName]. While testing for year 2000 problems, he accidentally 
checked-in this file while his machine clock was set forward to the year 2000. 
This meant that the source code was always newer than the object file and 
compiled every time the code was built. I'm checking this file in again to 
fix that. */

其他回答

// This part is more difficult

在方法的顶部。

大概有5行。

并不难。

这是唯一的评论。

在整个应用程序中。

//I am not sure why this works but it fixes the problem. 

这是之前的一组代码,技术上确实解决了问题,它的意思是,但打破了其他3个东西....

using namespace std;            // So sue me

不是一个评论,而是一个goto标签

ICantBelieveImUsingAGoto:
Get This hack!

在一行汇编代码中,在几页未注释的代码之后。