From: "James S. Rogers" <jimmaureenrogers@worldnet.att.net>
Subject: Re: Subprogram Pointer in a Generic
Date: Thu, 17 Apr 2003 02:54:02 GMT
Date: 2003-04-17T02:54:02+00:00 [thread overview]
Message-ID: <eHona.31811$cO3.2370875@bgtnsc04-news.ops.worldnet.att.net> (raw)
In-Reply-To: 1ftiuys.1twhum2q9qa00N%claveman@grzorgenplatz.net
"Charles H. Sampson" <claveman@grzorgenplatz.net> wrote in message
news:1ftiuys.1twhum2q9qa00N%claveman@grzorgenplatz.net...
> I'm using a procedure that takes a procedure pointer as an
> argument. It's pretty standard stuff:
>
> type Parameterless_Proc_Ptr is access procedure;
> procedure Register (The_Proc : in Parameterless_Proc_Ptr);
>
> My problem occurs when I want to call this procedure from within a
> generic package. I can't, because 3.10.2(32) says "If the subprogram
> denoted by P [the prefix of 'Access] is declared within a generic body,
> S [the access-to-subprogram type of the formal parameter] shall be
> declared within the generic body."
Why are you passing a procedure access to a generic?
Why not simply pass the procedure as a simple generic parameter:
generic
with procedure Parameterless_Proc;
This will allow you to call the actual procedure without any of the
issues you describe.
Jim Rogers
next prev parent reply other threads:[~2003-04-17 2:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-17 1:53 Subprogram Pointer in a Generic Charles H. Sampson
2003-04-17 2:54 ` James S. Rogers [this message]
2003-04-17 3:15 ` Samuel Tardieu
2003-04-17 5:27 ` tmoran
2003-04-17 3:12 ` Samuel Tardieu
2003-04-17 4:17 ` tmoran
2003-04-17 20:24 ` Robert A Duff
2003-04-18 2:59 ` Charles H. Sampson
2003-04-22 16:34 ` Warren W. Gay VE3WWG
2003-04-22 21:17 ` Robert A Duff
2003-04-23 20:46 ` Warren W. Gay VE3WWG
2003-04-17 19:41 ` Matthew Heaney
2003-04-17 20:39 ` Robert A Duff
2003-04-17 23:14 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox