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-7-bit X-Google-Thread: 103376,88858d66e427dbcb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-07 13:52:14 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed1.uni2.dk!news.get2net.dk.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Short circuit boolean evaluation References: <87f5a614.0311051528.30450c7a@posting.google.com> <87f5a614.0311061144.360b3325@posting.google.com> From: Mark Lorenzen Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:7QmTXZI0NlDxU1UapbG1+72ljAs= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 07 Nov 2003 23:59:06 +0100 NNTP-Posting-Host: 62.84.221.216 X-Complaints-To: abuse@colt-telecom.dk X-Trace: news.get2net.dk 1068241931 62.84.221.216 (Fri, 07 Nov 2003 22:52:11 CET) NNTP-Posting-Date: Fri, 07 Nov 2003 22:52:11 CET Organization: Colt Telecom Kunde Xref: archiver1.google.com comp.lang.ada:2234 Date: 2003-11-07T23:59:06+01:00 List-Id: Simon Wright writes: > Mark Lorenzen writes: > >> if (Alarm_Is_On and then Operator_Is_Alerted) then >> Wait_For_Operator; >> else >> Call_Fire_Brigade; >> end if; > >> By using the first version you explicitly explain to the reader that >> there is something fishy going on when evaluating Operator_Is_Alerted, >> since it may only be evaluated if Alarm_Is_On evaluates to true. > > And I notice those superfluous parens! > > -- > Simon Wright 100% Ada, no bugs. You got me! After 2.5 years of C/C++ programming I have already started to loose the "touch". How shall this end? - Mark Lorenzen