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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f76dd8b9e12e409a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-07 23:02:27 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.240.42.8!luth.se!erix.ericsson.se!newstoo.ericsson.se!not-for-mail From: "Sebastian" Newsgroups: comp.lang.ada Subject: Re: Access to subprogram Date: Wed, 8 May 2002 08:03:14 +0200 Organization: ericsson Message-ID: References: Reply-To: "Sebastian" NNTP-Posting-Host: 172.17.82.166 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Xref: archiver1.google.com comp.lang.ada:23699 Date: 2002-05-08T08:03:14+02:00 List-Id: Wow, It works! Thanks "David C. Hoos" wrote in message news:mailman.1020776522.17239.comp.lang.ada@ada.eu.org... > > ----- Original Message ----- > From: "Sebastian" > Newsgroups: comp.lang.ada > To: > Sent: Tuesday, May 07, 2002 7:47 AM > Subject: Access to subprogram > > > > What is the meaning of this > > " subprogram must not be deeper than access type" > It means exactly what it says. You're trying to take the access > value of a subprogram that is nested more deeply than is the > place where the access type is declared. > > To remedy this, you need to do one of two things, viz.: > > 1. Declare the subprogram at library level -- i.e., not in > a package or nested within another subprogram > > 2. Use 'Unrestricted_Access instead of 'Access, if you're > using GNAT, and if your are certain that the lifetime of > the subprogram is at least as long as the lifetime of the > access type. > > > >