comp.lang.ada
 help / color / mirror / Atom feed
From: v025@truman.edu (Chad R. Meiners)
Subject: Re: Controlled type question
Date: 1999/02/15
Date: 1999-02-15T00:00:00+00:00	[thread overview]
Message-ID: <36c765d4.0@silver.truman.edu> (raw)
In-Reply-To: m3zp6g1cs7.fsf@mheaney.ni.net

In article <m3zp6g1cs7.fsf@mheaney.ni.net>, matthew_heaney@acm.org says...
>
>
>Yes, you hit upon a rule, the one that says 
>
>  Controlled type must be declared at the library level
>
>You have this:
>
>  package GP is
>    ...
>  private
>    type T is new <controlled type> ...;
>  end GP;
>
>
>That's fine, but the illegal thing is doing this:
>
>package Q is
>...
>   package P is new GP (...);
>
>end Q;
>
>The problem is that inside the scope of package Q, you're not at library
>level, and so the instantiation of GP is illegal.
>
>You can try fixing it like this:
>
>package Q is
>...
>end Q;
>
>private package Q.P is new GP (...);
>
>
>(I think that's it.  Let me know if I interpreted things incorrectly.)

Thank you.  I wrote a four line ads file to do this and it works great.

-Chad R. Meiners





      reply	other threads:[~1999-02-15  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-14  0:00 Controlled type question Chad R. Meiners
1999-02-15  0:00 ` Matthew Heaney
1999-02-15  0:00   ` Chad R. Meiners [this message]
replies disabled

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