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 09:27:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!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> 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: NNTP-Posting-Host: 208.191.180.40 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr30.news.prodigy.com 1010424404 ST000 208.191.180.40 (Mon, 07 Jan 2002 12:26:44 EST) NNTP-Posting-Date: Mon, 07 Jan 2002 12:26:44 EST Organization: Prodigy Internet http://www.prodigy.com X-UserInfo1: [[PA@SJGTZYQBQXYQ[OD]_HBWB]^PCPDLXUNNH\KMAVNDQUBLNTC@AWZWDXZXQ[K\FFSKCVM@F_N_DOBWVWG__LG@VVOIPLIGX\\BU_B@\P\PFX\B[APHTWAHDCKJF^NHD[YJAZMCY_CWG[SX\Y]^KC\HSZRWSWKGAY_PC[BQ[BXAS\F\\@DMTLFZFUE@\VL Date: Mon, 07 Jan 2002 17:26:44 GMT Xref: archiver1.google.com comp.lang.ada:18614 Date: 2002-01-07T17:26:44+00:00 List-Id: "Hyman Rosen" wrote in message news:3C39D86C.7030704@mail.com... > Larry Kilgallen wrote: > > > What is dubious about optimizing: > > if my_function (arg1, arg2, arg3, arg4) and not suppression_mode > > then > > where suppression_mode is a boolean variable ? > > > What is it you're asking me here? In this case Ada requires that > my_function is called, regardless of the value of suppression_mode, > so what optimization do you have in mind? Remember, "and" is > required to evaluate both operands. You seem to think that "and" is > allowed to short-circuit one of the operands. 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. -- --- 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