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=-0.1 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM,PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,99c3f341deeb2ba1 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!feeder.news-service.com!newsfeed.straub-nv.de!eternal-september.org!.POSTED!not-for-mail From: Warren Newsgroups: comp.lang.ada Subject: Re: Overload of functions in a task stack Date: Mon, 10 May 2010 17:30:14 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <3d6d6fdc-83a5-41c1-b297-dace3051ff3b@o14g2000yqb.googlegroups.com> Injection-Date: Mon, 10 May 2010 17:30:14 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="9f8M0iN5t54V+4DF/iqO8g"; logging-data="25673"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EXwg6cgVflUJTx9Zf/FaXvZomk9/Dkgc=" User-Agent: Xnews/5.04.25 X-Face: &6@]C2>ZS=NM|HE-^zWuryN#Z/2_.s9E|G&~DRi|sav9{E}XQJb*\_>=a5"q]\%A;5}LKP][1mA{gZ,Q!j Cancel-Lock: sha1:cmbec0V22MTc3y3xV6P40BtQTFs= Xref: g2news2.google.com comp.lang.ada:11455 Date: 2010-05-10T17:30:14+00:00 List-Id: Anh Vo expounded in news:a4179dee-f23c-489b-9695- 166460597b1b@u30g2000prd.googlegroups.com: > On May 3, 10:57�am, Pablo wrote: >> Hi, >> I have a function called Answer defined in several packages (each one >> is different according to the own package), and each function Answer >> is called by a permanent task every cycle. The issue is that when I >> compile some packages, the compiler bugs me informing "warning: >> declaration of "Answer" hides one at (...)". So, is there a way to >> define these overload functions in a "secure" way that I do not need >> to use pragma Warnings (OFF) to avoid these warnings? >> Thanks > > I believe use Clause of more than one package containing function > Answer is involved. The simple fix is to replace use Clause with full > qualification. > > Anh Vo As a compromise, you can do as I often do. Restrict your use clause usage to certain declare blocks. But this still won't work if two or more packages are simultaneously "used" containing "Answer". But I find this technique useful for use clausing in a more controlled manner. procedure Beat_Me_Use_Me is ... begin ... declare use P1; T1 : P1_Type; -- from P1 begin Answer(T1); -- P1.Answer end; ... end Beat_Me_Use_Me; Warren