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 X-Google-Thread: 103376,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-02 00:54:24 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news2.telebyte.nl!news.jgaa.com!news.hacking.dk!pnx.dk!munin.nbi.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: In-Out Parameters for functions Date: 02 Mar 2004 09:48:51 +0100 Organization: Munin Sender: sparre@sparre.crs4.it Message-ID: References: <4020C947.81A6D703@0.0> <1075907239.138068@master.nyc.kbcfp.com> <402232E9.3EE15B4B@0.0> <1075987360.225622@master.nyc.kbcfp.com> <40236C0B.E988E003@0.0> <1077634311.254581@master.nyc.kbcfp.com> <1077718871.47635@master.nyc.kbcfp.com> <54cp3095jmv8s17h63d4bjdus0tec7l7pt@jellix.jlfencey.com> <1077721343.481619@master.nyc.kbcfp.com> <1077727853.904323@master.nyc.kbcfp.com> <1077810250.28474@master.nyc.kbcfp.com> <1078162736.111267@master.nyc.kbcfp.com> <8qW0c.24142$TF2.22229@nwrdny02.gnilink.net> NNTP-Posting-Host: sparre.crs4.it Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: munin.grove.home 1078217332 24791 156.148.70.170 (2 Mar 2004 08:48:52 GMT) X-Complaints-To: sparre@munin.nbi.dk NNTP-Posting-Date: Tue, 2 Mar 2004 08:48:52 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:6003 Date: 2004-03-02T09:48:51+01:00 List-Id: Hyman Rosen wrote: > So unless you're coding in a way where you expect to cause and catch > l-d checks, it won't matter. Yes (assuming your functions haven't got side effects). > Also, if I read that section correctly, in a sequence of code like > this > a := 0; > b := c + d; > e := f + g; > h := i + j; > a := 1 / a; > it is possible that only the assignment to a will have occurred when > the exception handler from the division by zero is executed, is that > correct? I _think_ (haven't got the ARM around right now) that in case the object b, e and h aren't accessible/used after the exception has been raised, you are correct that the only thing that actually happens in the following statements is that an exception is raised by the division by zero. This view is based on the principle of �same external effect�. If b, e or h on the other hand is accessible/used after the exception has been raised, then the (or some of the) three intermediate statements have to be executed as well to give the same external effect. > Doesn't that make catching failures of language-defined checks > useless? You will know that something bad happened, but you won't > know which objects in your program are abnormal. No. You should know from the sequence the statements are written in, which statements have been executed if it has an effect on which of the _accessible_ objects are in which state. Jacob (who isn't a LL and didn't look it up in the ARM) -- �What fun is it being "cool" if you can't wear a sombrero?�