From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2308afbbe4ecec0b X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: Subverting 'Access for Sub-programs Date: 1999/08/03 Message-ID: <7o7bvm$sp1$1@nnrp1.deja.com>#1/1 X-Deja-AN: 508438567 References: <37A71EF1.2201@dera.gov.uk> X-Http-Proxy: 1.0 x32.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Tue Aug 03 18:21:55 1999 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.6 [en] (WinNT; I) Date: 1999-08-03T00:00:00+00:00 List-Id: In article <37A71EF1.2201@dera.gov.uk>, Anton Gibbs wrote: > The offending statement is the one containing the 'Access because > Print_If_Even is declared at deeper level than it. > > So how can I achieve what I need here (ie. visibility of parameter I) > without either: a) using global data and making the whole thing > unnecessarily non-reentrant; or b) recourse to the usual generic > contortions which I thought Ada95's procedure access types had allowed Easy. Declare your accessed routine at the top level of a package. I've run into this several times. Every time it was when I was trying to write a toy example or a test driver. Under normal circumstances the client of your package will probably be another package anyway. -- T.E.D. Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.