* Overload of functions in a task stack
@ 2010-05-03 17:57 Pablo
2010-05-03 23:53 ` Anh Vo
0 siblings, 1 reply; 3+ messages in thread
From: Pablo @ 2010-05-03 17:57 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Overload of functions in a task stack
2010-05-03 17:57 Overload of functions in a task stack Pablo
@ 2010-05-03 23:53 ` Anh Vo
2010-05-10 17:30 ` Warren
0 siblings, 1 reply; 3+ messages in thread
From: Anh Vo @ 2010-05-03 23:53 UTC (permalink / raw)
On May 3, 10:57 am, Pablo <pablit...@gmail.com> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Overload of functions in a task stack
2010-05-03 23:53 ` Anh Vo
@ 2010-05-10 17:30 ` Warren
0 siblings, 0 replies; 3+ messages in thread
From: Warren @ 2010-05-10 17:30 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1316 bytes --]
Anh Vo expounded in news:a4179dee-f23c-489b-9695-
166460597b1b@u30g2000prd.googlegroups.com:
> On May 3, 10:57�am, Pablo <pablit...@gmail.com> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-10 17:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-03 17:57 Overload of functions in a task stack Pablo
2010-05-03 23:53 ` Anh Vo
2010-05-10 17:30 ` Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox