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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.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: Tue, 07 May 2013 06:13:08 +0200 Organization: Ada @ Home Message-ID: References: <7704abab-86f2-4edc-ad4b-b3d4e70004fb@googlegroups.com> NNTP-Posting-Host: /5uFWkegPs0CGJSoRIUiIw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.15 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:15396 Date: 2013-05-07T06:13:08+02:00 List-Id: Le Tue, 07 May 2013 05:59:49 +0200, Yannick Duch=C3=AAne (Hibou57) = a =C3=A9crit: > > -- SPARK way to solve the issue > -- and to make explicit what it do. To not count side effects, which are not even visible in any way at the = = sub=E2=80=91program declaration, so not even declared out/in=E2=80=93out= to expect with = these. Except for SPARK (the same as above with an added side effect wit= h = read/write involving a global variable): E : U; -- Side effect with this. procedure P (A : out T; B : in out T; C : in T); --# global E; --# derives --# A from B, C, E & --# B from B, C & --# E from B; Here, `E` appears at the declaration of `P` and is like declared in=E2=80= =91out = (`A` derived from `E` means like if it was`in` and `E` derived from `B` = = means like if it was also `out`). -- = =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