Subj : Re: Syntax, style, the infinite monkey theorum and coding To : comp.programming From : Willem Date : Mon Aug 22 2005 06:02 pm Rob wrote: )> > Ed Prochak wrote: )> > > how about a C program with a seven page while() loop where the )> > > condition on the while() loop was seven full lines long (where full )> > > means about 70characters per line, not counting whitespace)? Sorry I )> > > don't have the code available. That was at a job nearly twenty years )> > > ago. It was written by a contractor that the company respected and was )> > > considered a great programmer. Needless to say I did not share that )> > > opinion when I was assigned to maintain and debug this beast. ) ) Yeah, I've seen code like this that is perfectly understandable. The ) conditions to break-out of doing something complex can be quite ) complex. Why are you all assuming the seven lines of while-condition are actually only doing the testing on the conditions ? If it was that nasty, I'm sure there was some actual work being done in that while-condition as well. As a simple example: i = 0, j = 10; do { if (test(i)) { something(i, j); continue; } something_else(j); } while (i = i + 2, j = j * 2, i < N); SaSW, Willem -- Disclaimer: I am in no way responsible for any of the statements made in the above text. For all I know I might be drugged or something.. No I'm not paranoid. You all think I'm paranoid, don't you ! #EOT .