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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3867e2f73fa21ec X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 X-Received: by 10.68.137.71 with SMTP id qg7mr6828746pbb.5.1367781809452; Sun, 05 May 2013 12:23:29 -0700 (PDT) Path: bp1ni1644pbd.1!nntp.google.com!news.glorb.com!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Ada 2012: In-out parameters for functions Date: Sun, 05 May 2013 21:23:21 +0200 Organization: Ada @ Home Message-ID: References: <7704abab-86f2-4edc-ad4b-b3d4e70004fb@googlegroups.com> NNTP-Posting-Host: 01/BPNoqk8s7XmPzrYdoUA.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.15 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2013-05-05T21:23:21+02:00 List-Id: Le Sun, 05 May 2013 17:09:11 +0200, Niklas Holsti = a =C3=A9crit: > I believe I have made some Ada coding errors that would have been > revealed by mode notations in calls. I don't remember the exact > examples, but I think one concerned a procedure in which an "in" > parameter was changed to an "in out" parameter, because some new uses = of > the subprogram required it -- but then some old uses no longer worked,= > because they assumed that the actual for this parameter would not be > changed. And the actual was a non-constant object, so the compiler saw= > nothing wrong in its use for an in-out parameter. That's an argument for Randy's idea to make constant the default mode fo= r = local variable and constant declarations. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity