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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-25 13:33:36 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!news.octanews.net!ash.uu.net!spool.news.uu.net!not-for-mail Date: Wed, 25 Feb 2004 16:33:27 -0500 From: Hyman Rosen User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: In-Out Parameters for functions References: <1077634311.254581@master.nyc.kbcfp.com> <1077718871.47635@master.nyc.kbcfp.com> <54cp3095jmv8s17h63d4bjdus0tec7l7pt@jellix.jlfencey.com> <1077721343.481619@master.nyc.kbcfp.com> <1077724400.221032@master.nyc.kbcfp.com> <1077727496.631820@master.nyc.kbcfp.com> <103q2cf890pus79@corp.supernews.com> In-Reply-To: <103q2cf890pus79@corp.supernews.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1077744815.17965@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@nightcrawler.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1077744815 6522 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:5819 Date: 2004-02-25T16:33:27-05:00 List-Id: Randy Brukardt wrote: > "Hyman Rosen" wrote >>Where do you find permission for Ada to not evaluate one >>operand of an "and" or "or" expression? > > 11.6(5), of course. For the particular case of sqrt(x), where we're talking about Ada's built-in sqrt, and the only possible side-effect is for it to raise an exception. But if instead we have (gnurble(x) > 0.5 and b), and the compiler knows that b is false but has no information about what gnurble does, it must call gnurble(x) even though the result is irrelevant.