Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn) Newsgroups: net.lang.c Subject: Re: Breaking out of several nested loops (& ANSI C) Message-ID: <5342@brl-tgr.ARPA> Date: Tue, 16-Oct-84 20:01:13 EDT Article-I.D.: brl-tgr.5342 Posted: Tue Oct 16 20:01:13 1984 Date-Received: Thu, 18-Oct-84 00:47:25 EDT References: <1801@pegasus.UUCP> <16435@arizona.UUCP> <2065@rochester.UUCP> <1820@pegasus.UUCP> Organization: Ballistic Research Lab Lines: 45 The "break looplabel;" and "continue looplabel;" proposals should not be added to the C language because they provide no additional functionality but complicate compilation. As has been repeatedly pointed out in this debate, they are not any clearer than similar use of "goto label;". Part of the spurious argument to the contrary assumes the silly K & R brace conventions are being used (sorry, guys, you're still my heroes). Tell me how while ( condition ) { ... if ( emergency ) goto forward; ... } forward: is any harder to comprehend than backward: while ( condition ) { ... if ( emergency ) break backward; ... } Unless the proposal is combined with outlawing "goto", nothing is gained by it. However, the ANSI committee better not outlaw "goto" since a large amount of existing C code, including a few UNIX system utilities, would be broken by this. Sure, one could rewrite code like again: ... if ( this_one_not_it ) goto again; ... to use some other looping mechanism, but the point is not to force the massive amount of rewriting that this would entail. Otherwise non-standard compilers are going to be maintained indefinitely anyway, which defeats the purpose of trying to outlaw "goto".