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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f188b1cd9c1f24dc X-Google-Attributes: gid103376,public From: Simon Wright Subject: Re: Parameter evaluation order Date: 1998/04/10 Message-ID: #1/1 X-Deja-AN: 343073649 X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 References: <6g9d2o$tfg$1@nnrp1.dejanews.com> X-Complaints-To: abuse@demon.net X-Trace: news.demon.co.uk 892304157 nnrp-01:21772 NO-IDENT pogner.demon.co.uk:158.152.70.98 Organization: At Home Newsgroups: comp.lang.ada Date: 1998-04-10T00:00:00+00:00 List-Id: matthew_heaney@acm.org (Matthew Heaney) writes: > In article , Simon Wright > 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 ..