[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: readDate in KLocale
From:       Lubos Lunak <l.lunak () sh ! cvut ! cz>
Date:       2002-08-07 9:59:55
[Download RAW message or body]

Dne st 7. srpen 2002 11:43 Jacek Stolarczyk napsal(a):
> On Wed, 7 Aug 2002, David Faure wrote:
> [...]
>
> > No need to switch to a while() (with the risk to forget initialization or
> > j++ somewhen).
> >
> > Simply doing
> > for (int j = 1; j < 8 && error; j++) {
> > will abort the loop when a match is found.
> > (Is this what this is about?)
>
> Yes, exactly. It's just that the "for" loop with additional condition is a
> little obscure. "while()" is better suited for breaking loop when a
> condition is no longer met, after all.

 And now somebody tell me that 'break' makes obscure and messy code.

--
 Lubos Lunak
 llunak@suse.cz ; l.lunak@kde.org
 http://dforce.sh.cvut.cz/~seli



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic