Path: utzoo!attcan!uunet!mcsun!tuvie!vmars!hp From: hp@vmars.tuwien.ac.at (Peter Holzer) Newsgroups: comp.lang.c Subject: Re: Seven Original Sins of K&R (Long) Message-ID: <1896@tuvie> Date: 2 Oct 90 15:04:22 GMT References: <12780@sdcc6.ucsd.edu> <1990Sep26.124303.10527@eua.ericsson.se> Sender: news@tuvie Lines: 22 rv@erix.ericsson.se (Robert Virding) writes: >What's the problem? "break" means break out of the surrounding >while/for/case. The REAL sin is that "break" ignores a surrounding if. >This really can cause problems. Like in: 1: for (;;) { 2: /* code */ 3: if (expression) break; 4: /* more code */ 5: } If break would break out of the surrounding if, it would not break out of the loop, so line 3 would just be a noop. -- | _ | Peter J. Holzer | Think of it | | |_|_) | Technische Universitaet Wien | as evolution | | | | | hp@vmars.tuwien.ac.at | in action! | | __/ | ...!uunet!mcsun!tuvie!vmars!hp | Tony Rand |