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 X-Google-Thread: 103376,7d1a6bfc6489c17b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-09-03 06:47:07 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!freenix!wanadoo.fr!not-for-mail From: Mathias Dolidon Newsgroups: comp.lang.ada Subject: Re: exiting a bloc Date: Sun, 03 Sep 2000 17:46:56 +0200 Organization: Wanadoo, l'internet avec France Telecom Message-ID: <39B27270.BF4F72C7@netcourrier.com> References: <39B15EA8.88DB58AB@netcourrier.com> <8orprn$b46$1@nnrp1.deja.com> <39B18091.7416092A@netcourrier.com> <86snrhkfep.fsf@acm.org> NNTP-Posting-Host: mix-lyon-106-226.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: wanadoo.fr 967988780 22784 193.250.217.226 (3 Sep 2000 13:46:20 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 3 Sep 2000 13:46:20 GMT X-Mailer: Mozilla 4.7 [fr] (X11; I; Linux 2.2.14-15mdk i686) X-Accept-Language: en Xref: supernews.google.com comp.lang.ada:487 Date: 2000-09-03T13:46:20+00:00 List-Id: Laurent Guerby a �crit : > > > I think an explicit boolean and an if statement after the "test" loop > look better than two loops here. See the code at the end of this post. > > Also, in Ada a for statement declare its indice, so you don't need to > declare them before (or if you do, the declare are hidden inside the > loop statement). GNAT 3.13 does warn about it in your original program: > > nbr_prem.adb:9:07: warning: "nombre_en_cours" is never assigned a value > nbr_prem.adb:9:24: warning: "diviseur" is never assigned a value > > Hope this helps, > > -- > Laurent Guerby Merci beaucoup !