Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!motcid!henley From: henley@motcid.UUCP (Aaron Henley) Newsgroups: comp.std.c Subject: Re: Is an argument to break, continue a bad idea? Message-ID: <2746@mica6.UUCP> Date: 2 May 90 18:34:49 GMT References: <1990Apr25.180007.13243@cunixf.cc.columbia.edu> <12694@smoke.BRL.MIL> <2647@mica6.UUCP> <1990Apr28.232221.20725@utzoo.uucp> <2700@mica6.UUCP> <1990May1.165701.4289@utzoo.uucp> Reply-To: motcid!henley@uunet.uu.net Organization: Motorola Inc., Cellular Infrastructure Div., Arlington Heights, IL Lines: 47 henry@utzoo.uucp (Henry Spencer) writes: >Why use loops, or ifs, or any other control structures, which replace some >subset of the functionality of the goto? Because they are easier to read >and harder to make mistakes with. The proposal wasn't to make break the >same as goto, but to provide a way of using break to exit multiple levels >of loops. Since humans find counting levels difficult, one should tag the >levels with names rather than requiring a count. Nobody has suggested the >equivalent of "#define break goto"; break would still be constrained to use >only for exiting loops (well, and switches). The constraint is important, >indeed crucial; without it, one might as well use goto. Noted, I misinterpreted this discussion, sorry. Does break