From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,99e8b9cfc31999f4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!news.cs.univ-paris8.fr!informatik.uni-bremen.de!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: explanation about an error message Date: Wed, 7 Jul 2004 12:58:52 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <5f59677c.0407070157.7e5d523@posting.google.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1089205132 11894 134.91.1.34 (7 Jul 2004 12:58:52 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Wed, 7 Jul 2004 12:58:52 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: g2news1.google.com comp.lang.ada:2099 Date: 2004-07-07T12:58:52+00:00 List-Id: Evangelista Sami 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"