"Ted Dennison" a �crit dans le message news: Lo5Y6.2832$yp1.84754@www.newsranger.com... > In article , M. A. Alves > says... > > > >Package O defines type O. GNAT does not recognize the type here: > > > >with O; use O; > >procedure O_Test is > > Object: O; -- HERE > > I don't believe you can have packages and types with the same name in the same > scope. Under the circumstances, I'd want to keep the package name. Yes you can. However, the main rule is that something is use-visible only if it does not conflict with a name that would be otherwise visible. Therefore, O designates the package (which is directly visible) and not the type (which is only use-visible). > You should probably aviod naming things the same as their enclosing package. Certainly >On > the other hand, this is yet another reason to aviod the use clause. Certainly not. The use clause has no effect in that case: when there is any risk of ambiguity, it nicely steps back. The "O" is the same if there were no use clause. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr