comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Short circuit boolean evaluation
Date: 07 Nov 2003 21:27:06 +0000
Date: 2003-11-07T21:27:06+00:00	[thread overview]
Message-ID: <x7v1xsjoonp.fsf@smaug.pushface.org> (raw)
In-Reply-To: m3u15hqb17.fsf@niflheim.malonet

Mark Lorenzen <mark.lorenzen@ofir.dk> 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.



  reply	other threads:[~2003-11-07 21:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-05 23:28 Short circuit boolean evaluation svaa
2003-11-06  3:49 ` Steve
2003-11-06 19:44   ` svaa
2003-11-06 23:03     ` tmoran
2003-11-07  0:26     ` Mark Lorenzen
2003-11-07 21:27       ` Simon Wright [this message]
2003-11-07 22:59         ` Mark Lorenzen
2003-11-07  2:29     ` Wes Groleau
2003-11-07  3:48     ` Steve
2003-11-10 11:18     ` Georg Bauhaus
2003-11-07  0:49 ` Gautier Write-only
2003-11-07  3:03   ` Alexandre E. Kopilovitch
2003-11-10 17:36   ` Warren W. Gay VE3WWG
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox