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


当前回答

//Time log says you've been here for 15 hours GO HOME, your code is hobo

其他回答

不是真的评论:

DvLog::Log("This silly log message fixes a PSCRIPT5.DLL gpf when printing to Adobe.");

可悲的是,没有评论,PSCRIPT5.DLL真的炸了…

 // WARNING!!!
 // Very perversive code ahead!

... about a 20 lines of "very perversive" code ...

// Now you can call your grandmother back. ;)

场景一:

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

我记不清了,大概是这样的:

Person p = new Person("John", "Doe", "male");
Collection women = new ArrayList();
women.insert(p.getTail());

这是肮脏的代码;)

// this is really complicated

没有其他评论了