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: matthew_heaney@acm.org (Matthew Heaney) Subject: Re: Parameter evaluation order Date: 1998/04/10 Message-ID: #1/1 X-Deja-AN: 342796115 Content-Transfer-Encoding: 8bit References: <6g9d2o$tfg$1@nnrp1.dejanews.com> Content-Type: text/plain; charset=ISO-8859-1 Organization: Network Intensive Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-04-10T00:00:00+00:00 List-Id: 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).