From: Georg Bauhaus <sb463ba@l1-hrz.uni-duisburg.de>
Subject: Re: explanation about an error message
Date: Wed, 7 Jul 2004 12:58:52 +0000 (UTC)
Date: 2004-07-07T12:58:52+00:00 [thread overview]
Message-ID: <ccgs2c$bjm$1@a1-hrz.uni-duisburg.de> (raw)
In-Reply-To: 5f59677c.0407070157.7e5d523@posting.google.com
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"
next prev parent reply other threads:[~2004-07-07 12:58 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 [this message]
2004-07-07 19:51 ` Evangelista Sami
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