comp.lang.ada
 help / color / mirror / Atom feed
From: Larry Hazel <lhhazel@otelco.net>
Subject: Re: Generic and visibility...
Date: Fri, 10 Jun 2005 20:18:00 -0500
Date: 2005-06-10T20:18:00-05:00	[thread overview]
Message-ID: <w_qqe.782$D83.7147@eagle.america.net> (raw)
In-Reply-To: <1118439252.943218.290110@g43g2000cwa.googlegroups.com>

e.coli wrote:
> my program is structured like this:
> 
> --bar.ads
> package Bar is
>    generic
>       with procedure Quuz;
>    package Baz is
> 
>       task type Dummy is
>          entry Run;
>       end Dummy;
> 
>       type Ptr_Dummy is access Dummy;
> 
>       procedure Quz (
>             X :    out Ptr_Dummy );
> 
>    end Baz;
>  end Bar;
> 
> --bar.adb
> with Ada.Text_Io;
> 
> package body Bar is
>     T_Array : array (Integer range 1 .. 10) of Baz.Ptr_Dummy; --error
>    package body Baz is
> 
>       task body Dummy is
>       begin
>          accept Run do
>             Ada.Text_Io.Put_Line
>                (Item => "Hello, Word!");
>             Quuz; --generic procedure
>          end Run;
>       end Dummy;
> 
>       procedure Quz (
>             X :    out Ptr_Dummy ) is
>       begin
>          X := new Dummy;
>       end Quz;
> 
>    end Baz;
> end Bar;
> 
> 
> why i can't acces to Baz.Ptr_Dummy?
> my deal is see the task pointer X outside Baz package.
> 
> thanks
> 
There is no package Baz, thus no Baz.Ptr_Dummy.  You must instanciate 
the generic package and reference the Ptr_Dummy in that package.



  reply	other threads:[~2005-06-11  1:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-10 21:34 Generic and visibility e.coli
2005-06-11  1:18 ` Larry Hazel [this message]
2005-06-11  4:44 ` Preben Randhol
  -- strict thread matches above, loose matches on Subject: below --
2004-11-04 15:23 generic " mferracini
2004-11-04 18:59 ` Georg Bauhaus
2004-11-05  3:39 ` John Woodruff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox