你遇到过的源代码中最好的注释是什么?
当前回答
//The following code is commented out
//(a load of commented out code followed)
其他回答
/* Mark: If there's one thing you learn from this code, it is this...
Never, ever fly Air France. Their customer service is absolutely
the worst. I've never heard the words "That's not my problem" as
many times as I have from their staff -- It should, without doubt
be their corporate motto if it isn't already. Don't bother giving
them business because you're just a pain in their side and they
will be sure to let you know the first time you speak to them.
If you ever want to make me happy just tell me that you, too, will
never fly Air France again either (in spite of their excellent
cuisine).
Update by oej: The merger with KLM has transferred this
behaviour to KLM as well.
Don't bother giving them business either...
Only if you want to travel randomly without luggage, you
might pick either of them.
*/
(A bunch of code that's really weird looking) //Kludge.
catch (Ex as Exception)
{
// oh crap, we should do something.
}
没有什么比一个空的catch块更能让人觉得代码是健壮的....
一个文件中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是多少?
'""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
'
' NOTE: DON'T SCREW WITH THIS CODE UNLESS YOU REALLY UNDERSTAND IT!
'
'""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
推荐文章
- 在构建中编写注释的语法是什么?gradle文件?
- Java注释中的/**和/*
- 有没有办法注释掉.ASPX页面中的标记?
- Jenkins:注释可以添加到Jenkins文件中吗?
- TypeScript注释的语法记录在哪里?
- CSV文件可以有注释吗?
- 什么是自文档化代码?它能取代文档化良好的代码吗?
- 在erb中添加注释的最佳方法
- 为什么Python没有多行注释?
- 我应该在批处理文件中使用哪种注释风格?
- 如何在Office VBA编辑器中注释和取消注释代码块
- “# noqa”在Python注释中是什么意思?
- 我可以向pip需求文件添加注释吗?
- 你遇到过的源代码中最好的注释是什么?
- 在Bash中创建多行注释的方法?