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 Path: g2news2.google.com!news4.google.com!news.glorb.com!news.cs.univ-paris8.fr!ciril.fr!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: How to get around "access type must not be outside generic unit" Date: Tue, 19 Dec 2006 08:41:28 +0100 Organization: Adalog Message-ID: References: <45853BDC.5000902@obry.net> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1166515263 9405 195.25.228.57 (19 Dec 2006 08:01:03 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Tue, 19 Dec 2006 08:01:03 +0000 (UTC) User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) In-Reply-To: Xref: g2news2.google.com comp.lang.ada:7953 Date: 2006-12-19T08:41:28+01:00 List-Id: Brian May a �crit : > Jean-Pierre> Taking the 'access in the specification is illegal, > Jean-Pierre> and (as explained above), the instantiation would be > Jean-Pierre> illegal. > > I get lost here. Why is taking the 'access value in the specification > illegal if the generic has been instantiated inside a procedure? It is a 'access on a procedure declared inside the package. Therefore, the lifetime of the designated procedure is the scope of the enclosing procedure, and you can't assign it to an access object whose lifetime is longer. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr