comp.lang.ada
 help / color / mirror / Atom feed
From: "PG" <leviquet@free.fr>
Subject: [Newbie] Visibility parent-child
Date: Tue, 11 May 2004 18:15:40 +0200
Date: 2004-05-11T18:15:36+02:00	[thread overview]
Message-ID: <40a0fc28$0$31944$626a14ce@news.free.fr> (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





             reply	other threads:[~2004-05-11 16:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-11 16:15 PG [this message]
2004-05-11 18:29 ` [Newbie] Visibility parent-child Georg Bauhaus
2004-05-11 18:46   ` PG
2004-05-12  9:32     ` Martin Krischik
2004-05-12  6:00 ` Martin Krischik
replies disabled

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