Dealing with pointer freaks

John Stanley stanley at phoenix.com
Thu Jun 27 08:23:55 AEST 1991


sherman at unx.sas.com (Chris Sherman) writes:

> IMHO, leave the dude alone.  Jump up and down when you find major problems
> in his code like:
> 
> char *d="068B9669996E9EA9E999E9DB999ACA9F8C8F",*p="12342506775730",o[480],*r,
> c,*z,*e,x,l=80,y='0';s(){memset(o,' ',480);z=o;}main(){s();while(c= *p++)if(c
> ){for(r=z+320,e=d+c*5;r>=z;r-=l,e--)for(x=(*e-y&~15)?*e-'A'+10:*e-y,q=r+4;x;x
> 1,q--)if(x&1)*q='*';z+=6;}else{for(r=o;r<o+480;r+=l)printf("%79.79s\n",r);s()
> 
> but for things like *(x+i), don't worry about it. 

   If God had not wanted us to write code that looked like that, He
wouldn't have invented 'indent'. 





More information about the Comp.lang.c mailing list