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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: stopping a loop iteration without exiting it Date: Sat, 6 Jan 2018 23:04:09 +0100 Organization: Adalog Message-ID: References: <7b8a1da2-c405-4cbc-9c0b-1fef804c9239@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 6 Jan 2018 22:04:07 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="7993d38171696d029c1ca9ec00681422"; logging-data="2780"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+hrU8KT9p+U4AIfTPnYqxs" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 In-Reply-To: <7b8a1da2-c405-4cbc-9c0b-1fef804c9239@googlegroups.com> Content-Language: fr Cancel-Lock: sha1:m3Gj/5g3azhQWcqqAOYEMzM1JqE= Xref: reader02.eternal-september.org comp.lang.ada:49796 Date: 2018-01-06T23:04:09+01:00 List-Id: Le 06/01/2018 à 01:26, Matt Borchers a écrit : > begin > ... > exception > when EX1 => ... > when EX2 => ... > when others => ... > finally > ... > end; > > This would allow programmers to handle common cleanup operations that would otherwise have to be duplicated in every exception case. Actually, it is possible (ever since Ada 83!) to have a common part for all exception handlers, and then different handlings according to the exception: exception when others => begin Common_Part; raise; exception when EX1 => ... when EX2 => ... ... end; end -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr