comp.lang.ada
 help / color / mirror / Atom feed
From: evangeli@cnam.fr (Evangelista Sami)
Subject: Re: explanation about an error message
Date: 7 Jul 2004 12:51:42 -0700
Date: 2004-07-07T12:51:42-07:00	[thread overview]
Message-ID: <5f59677c.0407071151.697198f6@posting.google.com> (raw)
In-Reply-To: ccgs2c$bjm$1@a1-hrz.uni-duisburg.de

Georg Bauhaus <sb463ba@l1-hrz.uni-duisburg.de> wrote in message news:<ccgs2c$bjm$1@a1-hrz.uni-duisburg.de>...
> Evangelista Sami <evangeli@cnam.fr> wrote:
> : 
> : generator.adb:4:06: unit in with clause is private child unit
> : generator.adb:4:06: current unit must also have parent "Decls"
>  
> : file generator.adb :
> : -------------------------------
> : 
> : with Generator.Decls; use Generator.Decls;
> : with Generator.Decls.Vars; use Generator.Decls.Vars;  
> : package body Generator is
> :   ...
> : end generator;
> : -------------------------------
> : 
> : line 4 is "with Generator.Decls.Vars; use Generator.Decls.Vars;".
> : generator.decls and generator.decls.vars are two private packages.
> 
> I've found it useful to think of children as of nested packages:
> 
> package Generator is
> 
>    procedure run;
> 
> private  -- part of Generator
> 
>    foo: Wide_Character;
> 
>    package Vars is
> 
>       var_foo: Wide_Character;
> 
> 
>    private  -- part of Vars
> 
>       package Decls is
>          decl_foo: Wide_Character;
>       end Decls;
> 
>    end Vars;
> 
> end Generator;
> 
> package body Generator is
> 
>    ---------
>    -- run --
>    ---------
> 
>    procedure run is
>       oops: Wide_Character;
>    begin
>       oops := Vars.var_foo;
>       oops := Vars.Decls.decl_foo;
>    end run;
> 
> end Generator;
> 
> 
>     11.       oops := Vars.Decls.decl_foo;
>                           |
>         >>> "Decls" is not a visible entity of "Vars"


so what i'm tryng to do is impossible?



  reply	other threads:[~2004-07-07 19:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-07  9:57 explanation about an error message Evangelista Sami
2004-07-07 12:58 ` Georg Bauhaus
2004-07-07 19:51   ` Evangelista Sami [this message]
2004-07-07 20:32     ` Randy Brukardt
replies disabled

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