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-Thread: 103376,4ce0ea7d497db907 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: anonymous access type Date: Tue, 03 Mar 2009 14:43:33 +0100 Organization: Adalog Message-ID: References: NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1236080807 17119 195.25.228.57 (3 Mar 2009 11:46:47 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Tue, 3 Mar 2009 11:46:47 +0000 (UTC) User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) In-Reply-To: Xref: g2news2.google.com comp.lang.ada:4865 Date: 2009-03-03T14:43:33+01:00 List-Id: Maciej Sobczak a �crit : > Now, being a good citizen, I would like to explicitly stress that the > parameter is passed 'in' instead of relying on implicit mode, so let's > add the 'in' keyword where it belongs: > > procedure Call (Process : in not null access procedure); > > GNAT says: "anonymous access type definition not allowed here". > > I cannot find anything in the standard that would explain this. Any > references are welcome. > 6.1(15/2): if you have an access definition, you can't specify a mode. Although it is not syntactically specified this way in the RM, you should see "access" as a kind of mode in itself. Therefore, it replaces the "in". The idea (at least in Ada95) was that you did not pass a pointer, you passed an object (of the designated type) by reference. Thus, "access" was really the mode. It is a bit less true in 2005, since null values are now allowed. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr