From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=1.0 required=3.0 tests=BAYES_20,FROM_ADDR_WS autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 7 May 92 07:32:52 GMT From: mcsun!sun4nl!gufalet.let.rug.nl!rug4!laverman@uunet.uu.net (Bert Laverma n) Subject: Re: knotty generics problem Message-ID: <1992May7.073252.22055@cs.rug.nl> List-Id: 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 Bert Laverman, Dept. of Computing Science, Groningen University Friendly mail to: laverman@cs.rug.nl The rest to: /dev/null