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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!mnetor!uunet!mcvax!enea!tut!hmj From: hmj@tut.fi (Matti J{rvinen) Newsgroups: comp.lang.ada Subject: Re: Side Effects Message-ID: <3111@kuukkeli.tut.fi> Date: 14 Apr 88 07:55:32 GMT References: <8804112114.AA03398@ajpo.sei.cmu.edu> Organization: Tampere University of Technology, Finland List-Id: In article <8804112114.AA03398@ajpo.sei.cmu.edu> jmoody@DCA-EMS.ARPA (Jim Moody, DCA C342) writes: >The order in which the components are evaluated is not determined by >the language (LRM 3.2.1(15), last sentence). So there is an inconsistency here (?): LRM 3.2 (13) states that multiple declaration a,b : T := func; is equivalent to a : T := func; b : T := func; IN THIS ORDER. LRM 3.9 (3) states that elaboration must occur in the order given. In fact, LRM 3.2.1 (15) refers to elaboration of ONE object (e.g. record). One should not apply it to multiple declaration, so summa summarum: values must be 1,2,3,4,5,6, in this order. >What this goes to show is that writing function with side effects is a very, >very risky business in Ada. Actually, it's a risky business in any language, >but Ada makes the risk explicit. No. Ada zeros the risk. -- Hannu-Matti Jarvinen, Tampere University of Technology, Finland hmj@tut.fi, hmj@tut.uucp, hmj@tut.funet (tut.ARPA is not the same computer).