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,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-25 08:06:26 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!adsl-213-200-246-247.cybernet.CH!not-for-mail From: Vinzent 'Gadget' Hoefler Newsgroups: comp.lang.ada Subject: Re: In-Out Parameters for functions Date: Wed, 25 Feb 2004 17:05:41 +0100 Organization: JeLlyFish software Message-ID: 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> NNTP-Posting-Host: adsl-213-200-246-247.cybernet.ch (213.200.246.247) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de 1077725185 54238603 I 213.200.246.247 ([175126]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:5795 Date: 2004-02-25T17:05:41+01:00 List-Id: Hyman Rosen wrote: >The rules of Ada require that for "and", both >operands are evaluated! No, it doesn't. >> BTW, the above is another reason why you shouldn't write functions >> with side effects, because if you do the compiler *has* to evaluate >> Sqrt, too. :-) > >If the compiler knows enough about Sqrt to know that it has no side >effects, then it will have no problem checking b first even if you >write (sqrt(x) > 5.0 and then b). Well, in *this* case you *want* it to be evaluated first, I guess. :) >Really, all these arguments sound so desperate. Well, I don't build compilers. But - AFAICS - the only reason for not fixing the evaluation order usually *is* code optimization. Vinzent.