Deutsch English Français Italiano |
<v2p9cg$26gfp$4@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: comp.lang.c Subject: Re: C23 thoughts and opinions - why so conservative? Date: Fri, 24 May 2024 05:42:41 -0000 (UTC) Organization: A noiseless patient Spider Lines: 23 Message-ID: <v2p9cg$26gfp$4@dont-email.me> References: <v2l828$18v7f$1@dont-email.me> <20240523171911.00002f5a@yahoo.com> <v2o7re$1tlge$1@dont-email.me> <20240524003424.0000590a@yahoo.com> <v2op72$2017t$3@dont-email.me> <v2p94a$26km6$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 24 May 2024 07:42:41 +0200 (CEST) Injection-Info: dont-email.me; posting-host="0cff0ba9dc44f1983d14765f610aa6bd"; logging-data="2310649"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MV4A2V1/BzoYC9jJE9uZw" User-Agent: Pan/0.155 (Kherson; fc5a80b8) Cancel-Lock: sha1:nkx8JGOy6MzK9+kz+QkdX/r3iW8= Bytes: 1990 On Fri, 24 May 2024 06:38:18 +0100, Malcolm McLean wrote: > On 24/05/2024 02:06, Lawrence D'Oliveiro wrote: > >> On Fri, 24 May 2024 00:34:24 +0300, Michael S wrote: >> >>> On Thu, 23 May 2024 22:10:22 +0200 David Brown >>> <david.brown@hesbynett.no> wrote: >>> >>>> What program control construct would you like? >>>> >>> Ability to break from nested loops. >> >> At least 90% of the time, when I want to exit from an inner loop in C, >> there will be some kind of cleanup I need to do in the outer loop >> before that can exit too. So the ability to jump straight out will >> rarely be used. > > goto gives you the functionality you require. I avoid those. I structure my code like a Nassi-Shneiderman diagram, where each block has one entrance at the top, and one exit at the bottom. Easier to keep track of error conditions and cleanups that way.