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/05 Message-ID: #1/1 X-Deja-AN: 341254289 Content-Transfer-Encoding: 8bit References: <6g9d2o$tfg$1@nnrp1.dejanews.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Organization: Network Intensive Newsgroups: comp.lang.ada Date: 1998-04-05T00:00:00+00:00 List-Id: In article <6g9d2o$tfg$1@nnrp1.dejanews.com>, Mark.Rutten@dsto.defence.gov.au wrote: >I'm using GNAT3.09 on WindowsNT (and also Solaris, but I didn't get >this problem). > >I compiled a procedure call similar to the following > > proc(func_one,func_two); > >The program relies on func_one being called _before_ func_two. But >at run-time the code above did the opposite! Is this a bug (and if so, has it >been fixed in 3.10)? Or is there something written in the language definition >to justify this behaviour? 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;