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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a88a78b31443d1a9,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-26 06:00:35 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: evangeli@cnam.fr (Evangelista Sami) Newsgroups: comp.lang.ada Subject: in-out and out parameters Date: 26 Feb 2004 06:00:35 -0800 Organization: http://groups.google.com Message-ID: <5f59677c.0402260600.3c27ad66@posting.google.com> NNTP-Posting-Host: 163.173.228.31 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1077804035 1294 127.0.0.1 (26 Feb 2004 14:00:35 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 26 Feb 2004 14:00:35 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:5847 Date: 2004-02-26T06:00:35-08:00 List-Id: hello i have this program : ==================== procedure Test is task T is entry E(I : out Integer; J : in out Integer); end T; task body T is begin accept E(I : out Integer; J : in out Integer) do I := 1; J := J * I; J := J * J; end E; end; I : Integer := 10; begin T.E(I, I); Put_Line(Integer'Image(I)); end; ==================== The output is 1. I thought that, as I and J were passed by references, when i call E with the same variables, I and J denote the same object. so i was expecting to get 100 in output. If someone had a clear explanation i would be very thankful.