comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@acm.org>
To: comp.lang.ada@ada-france.org
Subject: Re: Visibility rules and package names
Date: 16 Oct 2004 20:30:40 -0400
Date: 2004-10-16T20:30:40-04:00	[thread overview]
Message-ID: <mailman.6.1097973072.10401.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <ploej2s93s.fsf@sparre.crs4.it>

Jacob Sparre Andersen <sparre@nbi.dk> writes:

> When I started thinking about structuring the GUI code for a project I
> am working on, I quickly came to a point where I had the following
> piece of code:
> 
>    package Project_Name is
>       type Data_Type is null record;
>    end Project_Name;
> 
>    package GtkAda is
>    end GtkAda;
> 
>    package GtkAda.Project_Name is
>    end GtkAda.Project_Name;
> 
>    with Project_Name;
>    package GtkAda.Project_Name.Specialized_Widget is
>       use type Project_Name.Data_Type;               -- Problem!
>    end GtkAda.Project_Name.Specialized_Widget;
> 
> Since "Project_Name" refers to "GtkAda.Project_Name" in child packages
> of "GtkAda.Project_Name" this will not compile.
> 
> Is there a way to refer to package "Project_Name" inside children of
> "GtkAda.Project_Name"?  

Standard.Project_Name.

> Or will I have to rename one of the packages "GtkAda.Project_Name"
> and "Project_Name"?
> 
> Jacob
> -- 
> "[...] *transfer* a bit of salary from the person who writes
>  a bug to the person that finds a bug..." -- Keith Ray
> 
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada-france.org
> http://www.ada-france.org/mailman/listinfo/comp.lang.ada
> 
> 

-- 
-- Stephe




      reply	other threads:[~2004-10-17  0:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-16 20:26 Visibility rules and package names Jacob Sparre Andersen
2004-10-17  0:30 ` Stephen Leake [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