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-01-27 02:45:44 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: wojtek@power.com.pl (Wojtek Narczynski) Newsgroups: comp.lang.ada Subject: Re: In-Out Parameters for functions Date: 27 Jan 2004 02:45:43 -0800 Organization: http://groups.google.com Message-ID: <5ad0dd8a.0401270245.70370179@posting.google.com> References: <5ad0dd8a.0401260606.76cc4415@posting.google.com> NNTP-Posting-Host: 80.54.181.211 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1075200344 18593 127.0.0.1 (27 Jan 2004 10:45:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 27 Jan 2004 10:45:44 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:4892 Date: 2004-01-27T02:45:43-08:00 List-Id: Hello, > The issue is not so simple. Consider, for example: > > P(F(...), G(...)); > > and F does "new T", and G also does "new T". Thus both F and G are both > reading and writing the same variable (namely, the Storage_Pool of T). Point taken, not simple. > No, order of parameter eval is not required to be left-to-right in Ada. So it looks to me like there is indeed an issue with in out parameters (and global state) for functions that the same program can behave differently compiled with different compilers. But as you pointed out, vast majority of side effects are commutative (allocation, counters). I also suspect that in real implementations the order is left to right. Unless some optimizations are in effect. And unless you-know-who has hidden his secret compiler of mass compilation you-know-where. Regards, Wojtek