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


当前回答

//没有评论

其他回答

场景一:

return 0; // Happy ending

场景二:

int32_t Interpolate1DSignal(
  Array1D<float64>::Handle hfInputSamples,         // samples to be interpolated
  Array1D<float64>::Handle hfInterpolationFilter,  // polyphase filter coefficients,
  int32_t iFilterInterpolationFactor,              // # of "rows" in polyphase filter
  int32_t iFilterLength,                           // Length of each row in filter
  float64 fInterpolationFactor,                    // Factor to interpolate the
                                                   // signal by
  float64 fTimingOffset,                           // Offset into the signal (units   
                                                   // of samples)
  Array1D<float64>::Handle hfOutputSamples         // left as an exercise for the reader
);

高斯林的Emacs源代码中的ascii艺术头骨和交叉骨骼(这里很难重现)(警告说他编写的超热屏幕管理包不容易理解)。

THIS PROGRAM HAS CODE THAT DOES NOT MEET STANDARDS      

这个评论几乎出现在我们这里的每一个节目中....

有一次,我在另一个讨论中看到这样的内容:

// I can't divide with zero, so I have to divide with something very similar
result = number / 0.00000000000001;

聪明的解决方案,不是吗?(如果有人不确定,这就是个笑话)

Get This hack!

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