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,8f7d6c5172a1d41b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news.glorb.com!solaris.cc.vt.edu!news.vt.edu!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: How to get around "access type must not be outside generic unit" Date: Sun, 17 Dec 2006 15:49:24 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <45853BDC.5000902@obry.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1166388564 11244 192.74.137.71 (17 Dec 2006 20:49:24 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sun, 17 Dec 2006 20:49:24 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:KrWRJVgYZlns2yk19o5oXbOMjuw= Xref: g2news2.google.com comp.lang.ada:7934 Date: 2006-12-17T15:49:24-05:00 List-Id: Michael Erdmann writes: >> procedure Register >> (Str : in String; A : access function return Boolean); >> > Actually this does not work; compiler complains the anonymous types > are not allowed here. It's an Ada 2005 feature. > private > Install_Access : constant Callback_Access := Install'Access; > But what is the gain of doing it like this. I don't see any > gain in security..?! It prevents dangling pointers. See AI-229. - Bob