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


当前回答

场景一:

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
);

其他回答

/*

 ____________________
/                    \
| Jean-Michel Bechet |
| 2002-2009          |
\___  _______________/
    |/
 (o_
 //\
 V_/_


*/
virgin = 0;     /* you're not a virgin anymore, sweety */
// Catching exceptions is for communists

来自Mike Duncan在SQLite上的页面。

// Hard to explain

它最后也坏了。难怪很难解释清楚

//把这个放在这里的人是个白痴…这根本不管用!

但是代码还在那里……