* Re: knotty generics problem
@ 1992-05-07 7:32 mcsun!sun4nl!gufalet.let.rug.nl!rug4!laverman
0 siblings, 0 replies; only message in thread
From: mcsun!sun4nl!gufalet.let.rug.nl!rug4!laverman @ 1992-05-07 7:32 UTC (permalink / raw)
Andrew Dunstan wrote:
> Here is a fragment of abstracted Pascal code:
>
> procedure a(procedure b(procedure c));
> procedure d;
> .
> .
> b(d);
Nice ;-)
> I (and a number of people with better minds than mine!) have wracked
> my brains trying to think of a way to do this neatly in Ada. We have
> all failed!
> I know it is provided for in 9X, but is there some genius out there
> who can suggest a way to do it with Ada as she is now?
You'ld have to use generics, as it is possible to use a procedure as
generic parameter. The syntax specifies that as generic formal parameter
a subprogram_specification can be given (section 12.1). Subprogram
specifications however do not include generic subprogram specifications...
So, one level of procedure parameter would work, two wouldn't. mark
one for Pascal here ;-)
> (This example might seem contrived, but I assure you it comes from
> a working Pascal program.)
Then you'll have to wait for Ada9x...
Greetings, Bert
--
#include <std/disclaimer>
Bert Laverman, Dept. of Computing Science, Groningen University
Friendly mail to: laverman@cs.rug.nl The rest to: /dev/null
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1992-05-07 7:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-05-07 7:32 knotty generics problem mcsun!sun4nl!gufalet.let.rug.nl!rug4!laverman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox