comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos" <david.c.hoos.sr@ada95.com>
Subject: Re: Access to subprogram
Date: Tue, 7 May 2002 08:01:33 -0500
Date: 2002-05-07T08:01:33-05:00	[thread overview]
Message-ID: <mailman.1020776522.17239.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: ab8i70$rgb$1@newstoo.ericsson.se


----- Original Message ----- 
From: "Sebastian" <sebastian.madunic@avionics.saab.se>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
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.


    




  reply	other threads:[~2002-05-07 13:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-07 12:47 Access to subprogram Sebastian
2002-05-07 13:01 ` David C. Hoos [this message]
2002-05-07 16:16   ` Stephen Leake
2002-05-08  6:03   ` Sebastian
  -- strict thread matches above, loose matches on Subject: below --
2002-05-07 12:56 Grein, Christoph
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox