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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c9a5d6b3975624e1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-08 10:27:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!torn!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Message-ID: <3DA31301.80506@cogeco.ca> From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: OO in Ada References: <3da2aafd.7023559@news.demon.co.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 08 Oct 2002 13:16:49 -0400 NNTP-Posting-Host: 198.96.47.195 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1034097413 198.96.47.195 (Tue, 08 Oct 2002 13:16:53 EDT) NNTP-Posting-Date: Tue, 08 Oct 2002 13:16:53 EDT Organization: Bell Sympatico Xref: archiver1.google.com comp.lang.ada:29596 Date: 2002-10-08T13:16:49-04:00 List-Id: Matthew Heaney wrote: > "John McCabe" wrote in message > news:3da2aafd.7023559@news.demon.co.uk... ... >>>:) However, if in a program 'use'ing the child package of 'Thick_Pen' >> > (and >>>not mentioning the base package of 'Pen') I make a call to the routine >>>'Draw' with an actual parameter of the type 'Pen' I get a compiler error >>>message to the effect that 'Draw' is not visible. In other words, >> > Thick_Pen > >>>has not inherited the operation Draw for 'Pen' Again, >>>_there_is_no_inheritace_. >> >>There is an easy answer to this that I can't remember at the moment. >>It's probably to do with using 'Class somewhere, but it may be that >>you have an incorrect declaration somewhere that isn't actually a >>creating a dispatching operation. I believe that the problem referred to here is simply one of a visibility. Either a 'use' or a fully qualified call is required. If I understand correctly, you're saying you have some parent package "Pen", and a child package "Thick_Pen", and you use the package as in: use Pen.Thick_Pen; ... Draw(...); -- Compile error because Draw is defined in Pen This is solved either by doing something like: use Pen, Pen.Thick_Pen; ... Draw(...); -- OK now, because Pen.Draw is visible. or qualifying by your call as in: use Pen.Thick_Pen; ... Pen.Draw(...); Warren. -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg