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 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-06 07:47:07 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp-relay.ihug.net!ihug.co.nz!logbridge.uoregon.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: "continue/next" for "loop" Date: 06 Nov 2003 10:39:19 -0500 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: shevek.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1068133395 23359 128.183.235.101 (6 Nov 2003 15:43:15 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 6 Nov 2003 15:43:15 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Xref: archiver1.google.com comp.lang.ada:2147 Date: 2003-11-06T15:43:15+00:00 List-Id: Lutz Donnerhacke writes: > I might be out of coffee, but I do not find an elegant way to skip the rest > of a loop body for the current cycle other than using "goto". > Your loop, slightly modified: procedure t is begin for j in 2 .. 8 loop for i in 2 .. 8 loop if i mod j = 0 then null; else Put(i'Img); end if; end loop; New_Line; end loop; end t; If the "null" and "Put (i'Img)" are actually complex sequences of statments, put them in a (local) procedure to make the top level structure clear. -- -- Stephe