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,dbbbb21ed7f581b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!goblin1!goblin2!goblin.stu.neva.ru!newsfeed.velia.net!news.tu-darmstadt.de!news.belwue.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Operation can be dispatching in only one type 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: <025105f2-5571-400e-a66f-ef1c3dc9ef32@g27g2000yqn.googlegroups.com> <0f177771-381e-493b-92bb-28419dfbe4e6@k19g2000yqc.googlegroups.com> <1nbcfi99y0fkg.1h5ox2lj73okx$.dlg@40tude.net> <59acf311-3a4a-4eda-95a3-22272842305e@m16g2000yqc.googlegroups.com> <4b150869$0$6732$9b4e6d93@newsspool2.arcor-online.net> <18vlg095bomhd.8bp1o9yysctg$.dlg@40tude.net> <4b152ffe$0$7615$9b4e6d93@newsspool1.arcor-online.net> <19nhib6rmun1x$.13vgcbhlh0og9$.dlg@40tude.net> <4b1557d0$0$7623$9b4e6d93@newsspool1.arcor-online.net> <4b15bf2b$0$7623$9b4e6d93@newsspool1.arcor-online.net> <1jcbtmi5rztyp$.norvlhez9i9$.dlg@40tude.net> <4b179ffb$0$6591$9b4e6d93@newsspool3.arcor-online.net> Date: Fri, 4 Dec 2009 09:52:18 +0100 Message-ID: NNTP-Posting-Date: 04 Dec 2009 09:52:18 CET NNTP-Posting-Host: 75729826.newsspool4.arcor-online.net X-Trace: DXC=Y3MPB]B<`DT[7Non7UCi8U4IUK_6OE^nA9@4AY X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:8304 Date: 2009-12-04T09:52:18+01:00 List-Id: On Thu, 3 Dec 2009 17:08:01 -0600, Randy Brukardt wrote: > It should be noted that our local coding standard would consider the above > incorrect; there always must be an else branch or at least a comment > explaining why there is no else branch: What about: if Read_Error (File) then raise Data_Error; end if; or if Estimated_Error <= Threshold then return Estimated_Result; end if; or "exit when", which is a hidden if without else. All these cases represent some lengthy action, maybe iterated or recursive. The action is left upon some condition. If not senseless "else null;", then semantically, under "else" there must be the rest of the action (recursive, infinite). Maybe "if" with two alternatives should better be "case". Though it would look strange most of us: case Condition is when True => X := This; when False => X := That; end case; -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de