comp.lang.ada
 help / color / mirror / Atom feed
* Re: Access to subprogram
@ 2002-05-07 12:56 Grein, Christoph
  0 siblings, 0 replies; 5+ messages in thread
From: Grein, Christoph @ 2002-05-07 12:56 UTC (permalink / raw)


> 
> What is the meaning of this
> " subprogram must not be deeper than access type"

package Pak is

  type Access_P is access procedure;
  Global: Access_P;

end Pak;

with Pak;
procedure Proc is

  procedure Local is separate;
  LA: Pak.Access_P := Local'Access;

begin
  Global := LA;
end Proc;

Here Local has a deeper level than Access_P, i.e. a shorter lifetime. The 
aforementioned rule forbids such a use as LA, since Global will point to a 
non-existing item after Porc has finished.



^ permalink raw reply	[flat|nested] 5+ messages in thread
* Access to subprogram
@ 2002-05-07 12:47 Sebastian
  2002-05-07 13:01 ` David C. Hoos
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian @ 2002-05-07 12:47 UTC (permalink / raw)


What is the meaning of this
" subprogram must not be deeper than access type"






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-05-08  6:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-07 12:56 Access to subprogram Grein, Christoph
  -- strict thread matches above, loose matches on Subject: below --
2002-05-07 12:47 Sebastian
2002-05-07 13:01 ` David C. Hoos
2002-05-07 16:16   ` Stephen Leake
2002-05-08  6:03   ` Sebastian

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