From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,459feef56669b92d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-03 08:49:46 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 03 Nov 2003 10:49:43 -0600 Date: Mon, 03 Nov 2003 11:49:42 -0500 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: "continue/next" for "loop" References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.34.214.193 X-Trace: sv3-C4WBrdwe/8joxDzvyBf4PfCcmgzF1xYzYiZVxHaeGfH1oXVE8XlCebt4Tf86XVIL2JJu+3a7UARnGdy!SzIXg/Vb16yeMwQwo3C5P4B71lO1SF28Mlk3qYUO8JoW8za054w0tMRp3+9zaA== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:1998 Date: 2003-11-03T11:49:42-05:00 List-Id: Peter Hermann wrote: > assuming the number of keywords 69 constant, > we could imagine these: I actually think we are going to get one or two new reserved words in Ada 200X. > goto loop [loopid]; > > or > > exit [loopid] not [when ...]; But I think in the case of loops, there are clearly two specialized forms of goto that should be considered: goto exit; -- exit innermost enclosing loop. exit loop; -- alternative syntax. ;-) and goto end; -- skip to start of next loop iteration. goto loop; goto begin; For the first case, I think that "exit loop" is probably the preferred notation. It really is a goto in disguise, but one that need not be prohibited by those coding standards that prohibit gotos. ;-) For the second, I am not sure whether "goto loop" or "goto end" is better. In either case it really is a goto. Other possibilities include "goto for" and "goto while," but this construct will IMHO often be used in loops with no for or while clauses. Back to the earlier discussion about "with and use," I think that "exit loop" and "goto loop," if added to the language would clearly enhance readability and maintainability. -- Robert I. Eachus 100% Ada, no bugs--the only way to create software.