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-Thread: a07f3367d7,3a6a9f1d654285ba X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 27 Aug 2009 12:01:33 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada Shootout program for K-Nucleotide (patches) References: <4a743343$0$32674$9b4e6d93@newsspool2.arcor-online.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4a96597e$0$32669$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 27 Aug 2009 12:01:34 CEST NNTP-Posting-Host: a9bea6de.newsspool2.arcor-online.net X-Trace: DXC=Zcb=YSV0UMZf8j24CD<3lPA9EHlD;3YcR4Fo<]lROoRQ^YC2XCjHcbY_QdCMOf^_Z^;9OJDO8_SKVNSZ1n^B98iZdN`S3c2LnKV X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:8015 Date: 2009-08-27T12:01:34+02:00 List-Id: Martin schrieb: > On Aug 27, 10:05 am, Martin wrote: >> Just tried to build the new version from the shootout site and it >> doesn't build: >> >> 46:16 warning: unreachable code >> >> in Data_Input.Read_Section. >> >> And sure enough I can't see how you get out the outer loop... >> >> Cheers >> -- Martin > > Sorry, it does build - it's a warning. My question is - if you can't > get out of the loop (except by exception) what are these lines doing > (other than making the SLOC metric very slightly worse)? They read data into the package global buffer which is then used for producing the result of the Read function. The loop (and all) is odd indeed but "justified" by the fact that Skip_To_Section reads until the third (and last) section begins. Read_Section starts there. A second "justification" is that Read_Section is a dumb rewrite of a previously recursive routine that concatenated strings (thereby hitting stack limits, no TCE, and making the test fail at the site). I had seen that warning, too, but other things being more pressing... We are in the process of preparing the multitasking version for submission. How should we change Read_Section?