readDate in KLocale

Lubos Lunak l.lunak at sh.cvut.cz
Wed Aug 7 10:59:55 BST 2002


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 at suse.cz ; l.lunak at kde.org
 http://dforce.sh.cvut.cz/~seli







More information about the kde-core-devel mailing list