comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pogner.demon.co.uk>
Subject: Re: Parameter evaluation order
Date: 1998/04/10
Date: 1998-04-10T00:00:00+00:00	[thread overview]
Message-ID: <x7v67kh8uk3.fsf@pogner.demon.co.uk> (raw)
In-Reply-To: matthew_heaney-ya023680001004980936440001@news.ni.net


matthew_heaney@acm.org (Matthew Heaney) writes:

> In article <x7vemz7xncq.fsf@pogner.demon.co.uk>, Simon Wright
> <simon@pogner.demon.co.uk> wrote:
> 
> >> declare
> >>    Arg1 : constant Arg1Type := Func_One;
> >>    Arg2 : constant Arg2Type := Func_Two;
> >> begin
> >>    proc (Arg1, Arg2);
> >> end;
> >
> >I was wondering if, because the order need arises from [invisible?]
> >side-effects, a compiler might be allowed to reorder the declarations;
> >but 3.11(7) says
> >
> >The elaboration of a declarative_part consists of the elaboration of
> >the declarative_items, if any, in the order in which they are given in
> >the declarative_part.
> 
> The term is "linear elaboration" of declarations.  You need this so you can
> use the value of an object previously declared.  It's the same as the let*
> expression in Lisp (compare let).

Yeah, but a compiler *might* have been given permission to re-order
elaborations if it could tell that there would be no difference ..




  reply	other threads:[~1998-04-10  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-05  0:00 Parameter evaluation order Mark.Rutten
1998-04-05  0:00 ` Matthew Heaney
1998-04-07  0:00   ` Don Harrison
1998-04-09  0:00   ` Simon Wright
1998-04-10  0:00     ` Matthew Heaney
1998-04-10  0:00       ` Simon Wright [this message]
1998-04-11  0:00         ` Robert Dewar
1998-04-06  0:00 ` Corey Ashford
1998-04-06  0:00 ` William D. Ghrist
1998-04-08  0:00 ` Glenden Lee
1998-04-09  0:00   ` Robert Dewar
     [not found]     ` <Er5Ir9.5Ip@world.std.com>
1998-04-09  0:00       ` Peter Amey
1998-04-09  0:00       ` Tucker Taft
1998-04-16  0:00         ` Nick Roberts
1998-04-17  0:00           ` Robert Dewar
replies disabled

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