把注释和代码交织在一起。
for(j=0; j
{
total += array[j+0 ];
total += array[j+1 ];
total += array[j+2 ]; /* Main body of
total += array[j+3]; * loop is unrolled
total += array[j+4]; * for greater speed.
total += array[j+5]; */
total += array[j+6 ];
total += array[j+7 ];
#define。看过本站那些混乱代码的文章,你都会知道宏定义和预编译对于写出不可读的代码的重大意义。不过,一个具有想像力的东西是——在头文件中使用预编译来查看这个头文件被include了几次,而被include不同的次数时,其中的函数定义完全不一样。
#ifndef DONE
#ifdef TWICE
// put stuff here to declare 3rd time around
void g(char* str);
#define DONE
#else // TWICE
#ifdef ONCE
<font color="#3e3e3e" face="Helvetica Neue, Helvetica, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif"><span style="font-size: 16px; line-height: 25.6px;">// put stuff here to declare 2nd time around