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


当前回答

Control + A,重写

这是在以前的项目中作为签入注释添加到源代码控制中的注释。

其他回答

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

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

/**---------START-----------**/

  //  IMPLEMENTATION GOES HERE

/**---------END-----------**/

但没有代码;)

//this is a crap way to do this but I ran out of patience

DelButton.click(); 

许多年前,我接受了这份工作,为一个真正运行的项目提供支持 在Z80上的时间和组装(有其他方法做Z80吗??) 不管怎样,原作者是一个叫摩西的尼日利亚人。也许我应该 就此止步。 不管怎样,代码中到处都是这样的:

XRA A    ;MT

我花了好长时间才弄明白这是什么。指令本身没有其他作用 比清除蓄能器。这是一种狡猾的方法,尽管我不确定是否有 不管是不是优势。你可以这样做:

LDA 0

但也许

XRA A

节省一个字节之类的。is所做的是排他的或者是累加器本身。 当然,结果总是零。

回到MT -空(明白吗?)

这是我遇到的最好的。

/**
 * As Gregor Samsa awoke one morning from uneasy dreams he found himself
 * transformed in his bed into a gigantic insect. He was lying on his hard,
 * as it were armour plated, back, and if he lifted his head a little he
 * could see his big, brown belly divided into stiff, arched segments, on
 * top of which the bed quilt could hardly keep in position and was about
 * to slide off completely. His numerous legs, which were pitifully thin
 * compared to the rest of his bulk, waved helplessly before his eyes.
 * "What has happened to me?", he thought. It was no dream....
 */
protected static String DEFAULT_TRANSLET_NAME = "GregorSamsa";