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=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:29:24 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Short circuit boolean evaluation Date: 07 Nov 2003 21:27:06 +0000 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: <87f5a614.0311051528.30450c7a@posting.google.com> <87f5a614.0311061144.360b3325@posting.google.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1068240563 25539 62.49.19.209 (7 Nov 2003 21:29:23 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Fri, 7 Nov 2003 21:29:23 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:2232 Date: 2003-11-07T21:27:06+00:00 List-Id: 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.