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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,7c7fba57c4978feb X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!usenet-fr.net!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Why no named case statements? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <5233a224-07c1-4a7b-906e-b4cb8e193c85@y42g2000yqb.googlegroups.com> Date: Sat, 5 Sep 2009 10:18:04 +0200 Message-ID: <1doe3xrcrqyeh.101b6gamg91bj.dlg@40tude.net> NNTP-Posting-Date: 05 Sep 2009 10:18:03 CEST NNTP-Posting-Host: 7cbb89a1.newsspool2.arcor-online.net X-Trace: DXC=Od1bJNObelbj5k5aEF7ISmA9EHlD;3Ycb4Fo<]lROoRa^YC2XCjHcbi^FoTjPekXkhDNcfSJ;bb[eIRnRBaCd On Fri, 4 Sep 2009 16:06:12 -0700 (PDT), Britt Snodgrass wrote: > Ada allows optional names for loops and declare blocks but not for > case or if statetements. Why not, since these are also multi-line > statements that terminate with an 'end" keyword? I sometimes use loop > names to clearly indicate the purpose of the loop and have wished I > could do the same for case statements, e.g., > > Decide_This: > case Some_Variable is > ... > end case Decide_This; > > or similarly for long if statements: > > Decide_That: > if Whatever then > ... > end if Decide_That: > > Such names could also be used in the outline view of an IDE like > Eclipse to support quick location of the named entity. > > I suppose there was some rationale so I'm curious what it was. Ada has labels: <> case Some_Variable is ... end case; <> if Whatever then ... end if: -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de