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/09 Message-ID: #1/1 X-Deja-AN: 342693462 References: <6g9d2o$tfg$1@nnrp1.dejanews.com> X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 X-Complaints-To: abuse@demon.net X-Trace: news.demon.co.uk 892200085 nnrp-02:7841 NO-IDENT pogner.demon.co.uk:158.152.70.98 Organization: At Home Newsgroups: comp.lang.ada Date: 1998-04-09T00:00:00+00:00 List-Id: matthew_heaney@acm.org (Matthew Heaney) writes: > No, this is not a bug. The language does not mandate an order of > evaluation of parameters. > > There is a very simple fix: > > 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.