你遇到过的源代码中最好的注释是什么?
当前回答
/* You are not meant to understand this */
其他回答
一个文件中5000多行代码中很少的一些注释 事实上,我和那个为自己的编码风格辩护的程序员有过一次争论…… 无可奉告! 没有评论;-)(或者很少) 遗憾的是,这是产品代码。
offset=1;
for (i=0;i<=len;i++)
{
if ((i!=0)&&(i<len)) //-3
{
switch(mess[i])
{
case ETX:
case ETB:
case DLE:
buf[offset]=DLE;
offset++;
break;
}
}
buf[offset]=mess[i];
offset++;
}
我喜欢这个开关!
for (n=0;n<offset;n++)
{
Sleep(TR); //Modif A
Sleep(T);//
FWriteFile(hCom,buf+n,1,&dwMot,NULL);
if (ECHO)
FReadFile(hCom,tab,1,&dwMot,NULL);
}
不,没有注释解释什么“修改A”是在标题。
if (GetFileSize(hSlotFile,NULL)==3600) //5*720
720是多少?
// The ratio of a circle's circumference to its diameter. Remember to change
// this to 3.0 if you move to a site in Indiana.
#define Pi 3.1415927
//下面的代码需要被注释掉
// Empty constructor to satisfy the stupid compiler
Public ServletHandlerClass () { }
when :orientation
## Avoid matching gay people with straight people - they hate it, they do, they really do.
query_parameter = "(users.orientation = 'Bi' OR (users.orientation = 'Straight' AND users.gender IN ('#{user.opposite_genders.join('\',\'')}')) OR (users.orientation = 'Gay' AND users.gender IN ('#{user.same_genders.join('\',\'')}')))"
从一个约会网站…