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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Is this a bug in my code or the compiler? Date: Sat, 13 Jun 2015 22:21:46 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <4f4cd4b1-0a6d-441b-a4f7-98add70e4e1e@googlegroups.com> <1p71vf5ckbudu$.1qcb9ot1jpysk.dlg@40tude.net> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1434252107 24415 24.196.82.226 (14 Jun 2015 03:21:47 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sun, 14 Jun 2015 03:21:47 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:26316 Date: 2015-06-13T22:21:46-05:00 List-Id: "David Botton" wrote in message news:afb6fe82-1f67-49a8-b4b1-f814a71ba8fd@googlegroups.com... >> That is one of the reasons why in-out's were not allowed for functions in >> Ada 83. The code is clearly erroneous because the computation order is >> not >> defined. Possibly Token_End is called before Token_Start! > > A programmer having to worry about order of operation in a concatenation > operation is a language flaw in my opinion. I can accept the issue in > evaluation order of Boolean expressions or numerics (and knew of that), > but not in non numeric types. Lots of people would agree with you, but neither J. Ichbiah or STT would, so Ada doesn't define the order of evaluation of almost anything: parameters (not just concat, but in all subprogram calls), aggregate components, and many more things. It would be way too disruptive to try to introduce any such rules now, especially as there are legal dispatching calls that cannot be evaluated left-to-right. The rules in 6.4.1 are supposed to prevent the worst problems, but of course they only work if correctly implemented. I'd suggest submitting one or more ACATS tests. :-) Randy.