comp.lang.ada
 help / color / mirror / Atom feed
* [Newbie] Visibility parent-child
@ 2004-05-11 16:15 PG
  2004-05-11 18:29 ` Georg Bauhaus
  2004-05-12  6:00 ` Martin Krischik
  0 siblings, 2 replies; 5+ messages in thread
From: PG @ 2004-05-11 16:15 UTC (permalink / raw)


Hi,

I can't access the child'types and I don't know why.

-- parent package specification
package Parent is
    blabla;
end Parent;
-- + body

-- child package specification
package Parent.Child is
    type Object is private;
    procedure Add (Ob: Object);
private
    type Object is
        record
            ...
        end record;
end Parent.Child;
-- + body

In a client program,  I import these 2 packages:
with Parent, Parent.Child;
use Parent, Parent.Child;
...
So, the procedure Add is visible but not the type Object !
When I declare :        Ob: Object;
it detects an error: "Object" is not visible.
When I declare with the prefix, it's OK: Ob: Parent.Child.Object;

I don't know why the type Object is not directly visible without prefix ?

Thanks for your help.

Patrick





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-05-12  9:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-11 16:15 [Newbie] Visibility parent-child PG
2004-05-11 18:29 ` Georg Bauhaus
2004-05-11 18:46   ` PG
2004-05-12  9:32     ` Martin Krischik
2004-05-12  6:00 ` Martin Krischik

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