comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Is this a bug in my code or the compiler?
Date: Sat, 13 Jun 2015 22:21:46 -0500
Date: 2015-06-13T22:21:46-05:00	[thread overview]
Message-ID: <mlis0a$nqv$1@loke.gir.dk> (raw)
In-Reply-To: afb6fe82-1f67-49a8-b4b1-f814a71ba8fd@googlegroups.com

"David Botton" <david@botton.com> 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.


  parent reply	other threads:[~2015-06-14  3:21 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 15:56 Is this a bug in my code or the compiler? David Botton
2015-06-12 16:15 ` Dmitry A. Kazakov
2015-06-12 17:25   ` G.B.
2015-06-12 18:00     ` Dmitry A. Kazakov
2015-06-13 10:04       ` Georg Bauhaus
2015-06-13 10:32         ` Dmitry A. Kazakov
2015-06-15 10:37           ` G.B.
2015-06-15 12:27             ` Dmitry A. Kazakov
2015-06-15 12:31               ` Simon Wright
2015-06-15 13:16                 ` Dmitry A. Kazakov
2015-06-15 14:56                   ` Simon Wright
2015-06-15 15:03                     ` G.B.
2015-06-13 19:42       ` Brad Moore
2015-06-12 17:53   ` David Botton
2015-06-12 18:11     ` Dmitry A. Kazakov
2015-06-12 18:43       ` marciant
2015-06-12 19:37     ` Jeffrey R. Carter
2015-06-12 19:55       ` Simon Wright
2015-06-12 20:40         ` Jeffrey R. Carter
2015-06-12 21:40           ` Simon Wright
2015-06-12 19:39     ` jan.de.kruyf
2015-06-12 22:10       ` David Botton
2015-06-13  0:19         ` Dennis Lee Bieber
2015-06-13 14:21         ` jan.de.kruyf
2015-06-14  3:13     ` Randy Brukardt
2015-06-14  3:21     ` Randy Brukardt [this message]
2015-06-12 16:48 ` Jeffrey R. Carter
2015-06-13 13:33 ` Jacob Sparre Andersen
2015-06-13 15:15   ` J-P. Rosen
2015-06-13 16:43     ` Jacob Sparre Andersen
2015-06-13 20:50       ` J-P. Rosen
2015-06-14  3:18   ` Randy Brukardt
2015-06-14  3:10 ` Randy Brukardt
2015-06-14  9:02   ` Jacob Sparre Andersen
2015-06-14 12:48     ` brbarkstrom
2015-06-15 22:06     ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox