comp.lang.ada
 help / color / mirror / Atom feed
From: Mark Lorenzen <mark.lorenzen@ofir.dk>
Subject: Re: Short circuit boolean evaluation
Date: Fri, 07 Nov 2003 23:59:06 +0100
Date: 2003-11-07T23:59:06+01:00	[thread overview]
Message-ID: <m3znf7eqf9.fsf@niflheim.malonet> (raw)
In-Reply-To: x7v1xsjoonp.fsf@smaug.pushface.org

Simon Wright <simon@pushface.org> writes:

> 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.

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



  reply	other threads:[~2003-11-07 22:59 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
2003-11-07 22:59         ` Mark Lorenzen [this message]
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