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,25aa3c7e1b59f7b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-07 12:05:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!feed2.news.rcn.net!rcn!newsfeed1.earthlink.net!newsfeed.earthlink.net!newscon02.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr30.news.prodigy.com.POSTED!not-for-mail From: "Pat Rogers" Newsgroups: comp.lang.ada References: <3C34BF2C.6030500@mail.com> <3C34D252.4070307@mail.com> <5ee5b646.0201040829.18db8001@posting.google.com> <3C35E733.6030603@mail.com> <3C35FE2A.9020802@mail.com> <3C360E76.3070308@mail.com> <3C39C120.1060706@mail.com> <3C39D86C.7030704@mail.com> <3C39E520.6030508@mail.com> Subject: Re: A case where Ada defaults to unsafe? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: <4bn_7.5399$HG5.1714543741@newssvr30.news.prodigy.com> NNTP-Posting-Host: 208.191.180.40 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr30.news.prodigy.com 1010433856 ST000 208.191.180.40 (Mon, 07 Jan 2002 15:04:16 EST) NNTP-Posting-Date: Mon, 07 Jan 2002 15:04:16 EST Organization: Prodigy Internet http://www.prodigy.com X-UserInfo1: [[PAPDONFJVMQVPXJZDBNFXBBZ\LPCXLLBWLOOAFQATJUZ]CDVW[AKK[J\]^HVKHG^EWZHBLO^[\NH_AZFWGN^\DHNVMX_DHHX[FSQKBOTS@@BP^]C@RHS_AGDDC[AJM_T[GZNRNZAY]GNCPBDYKOLK^_CZFWPGHZIXW@C[AFKBBQS@E@DAZ]VDFUNTQQ]FN Date: Mon, 07 Jan 2002 20:04:16 GMT Xref: archiver1.google.com comp.lang.ada:18622 Date: 2002-01-07T20:04:16+00:00 List-Id: "Hyman Rosen" wrote in message news:3C39E520.6030508@mail.com... > Pat Rogers wrote: > > > Well of course "and" is allowed to ignore one of the operands; if the first one > > evaluated is false, there is no need to evaluate the second. We are just not > > guaranteed which is evaluated first. > > > You are quite wrong. So much for the claim that experienced Ada > programmers simply learn the difference between "and" and "and then"! > See, for example, 3.8 in the Ada83 Rationale. Although it is questionable to base arguments on the Rationale, especially for the obsolete version of the language, let me suggest you consider 3.10 of the Ada 83 Rationale, which says in part, when introducing the short-circuit forms: "The operands of a boolean expression such as A and B can be evaluated in any order. Depending on the complexity of the term B, it may be more efficient ... to evaluate B only when the term A has the value TRUE. This, however, is an optimization decision taken by the compiler ..." But thanks for the compliment anyway. :-) --- Patrick Rogers Consulting and Training in: http://www.classwide.com Real-Time/OO Languages progers@classwide.com Hard Deadline Schedulability Analysis (281)648-3165 Software Fault Tolerance