Am Dienstag, 19. April 2005 17:52 schrieb Pete Zaitcev:
> On Tue, 19 Apr 2005 08:46:08 +0200 Oliver Neukum <[EMAIL PROTECTED]> wrote:
>
> > Am Montag, 18. April 2005 23:40 schrieb Pete Zaitcev:
> > > + i = 0;
> > > + for (;;) {
> > > + wb = &acm->wb[wbn];
> > > + if (!wb->use) {
> > > + wb->use = 1;
> > > + return wbn;
> > > + }
> > > + wbn = (wbn + 1) % ACM_NWB;
> > > + if (++i >= ACM_NWB)
> > > + return -1;
> > > + }
> >
> > Do you always code your 'for' loops manually ;-)?
>
> Only for multiply-exit loops. I cannot stand code like this:
>
> for (i = 0; i < N; i++) {
> if (something(i))
> break;
> }
> if (i == N)
> return -1;
>
> It's a direct import from Pascal, the worst legacy of Niclaus Wirth.
Well, that's a reason. No reason to debate taste here. I'd use goto to jump
out of the loop. Would you please resend with a signed-off-line to observe
the formalities?
Regards
Oliver