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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.glorb.com!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?B?QmrDtnJuIEx1bmRpbg==?= Newsgroups: comp.lang.ada Subject: Re: Error "exception not permitted here" when putting EXCEPTION in a loop Date: Sat, 18 Jul 2015 16:56:07 +0200 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 18 Jul 2015 14:53:25 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="5b7792bbfdd207fe5c19aea2206a9f76"; logging-data="7443"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hbhQh3uGG7VpjBgU2aiNa" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 In-Reply-To: Cancel-Lock: sha1:d0k1izHWfuAhkDLfTLTaDSBcYAk= Xref: number.nntp.giganews.com comp.lang.ada:194185 Date: 2015-07-18T16:56:07+02:00 List-Id: On 2015-07-18 16:08, Niklas Holsti wrote: >> Seems like a compiler bug to me, but the behavior of *text_io.get >> has surprised me before. > > It is specified in the LRM that if the Get for Integer_IO encounters a > character that cannot be part of the integer number, it stops at that > point and does not "pass" that character. This means that one can read > the integer 123 from the text "123ABC" and then read the string "ABC"; > the Get for the integer does not "consume" the "A". > > If you want to "clear the buffer", you should call Skip_Line, also in > the exception handler. Ah, that is it. -- -- Björn