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=-0.5 required=3.0 tests=BAYES_05 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 6 May 93 07:33:34 GMT From: cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!torn! nott!bnrgate!bnr.co.uk!zaphod.axion.bt.co.uk!uknet!pipex!zaphod.crihan.fr!univ- lyon1.fr!scsing.switch.ch!sicsun! (Magnus Kempe) Subject: Re: Passing procedures as parameters to procedures. Message-ID: <1993May6.092204@di.epfl.ch> List-Id: In article <1s82kk$dpm@huon.itd.adelaide.edu.au>, andrewd@achilles.cs.adelaide. edu.au (Andrew Dunstan,,2285592,) writes: : Unfortunately, my original A is recursive, and in particular it : is called from with D. (I realise I should have told you this!) No problem. Wrap A and D together in a generic package and use a call-through for X. generic with procedure B; package Wrap_AD_G is procedure D; procedure A; end Wrap_AD_G; package body Wrap_AD_G is procedure D is begin A; -- indirect recursion is expected: A -> B -> D -> A end D; procedure A is begin B; -- indirect recursion expected, B expected to use D if ... then A; end if; -- direct recursion if you wish end A; end Wrap_AD_G; procedure X; package Wrap_AD is new Wrap_AD_G (X); generic with procedure Y; procedure X_G; procedure X_G is begin Y; end X_G; procedure XD is new X_G (Wrap_AD.D); procedure X is -- call-through begin XD; end X; procedure A renames Wrap_AD.A; .... A; .... Any other changing requirements :-) ? -- Magnus Kempe "No nation was ever drunk when wine was cheap." magnus@lglsun.epfl.ch -- Thomas Jefferson