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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4c019ad9cc913bbe X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-20 07:01:33 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.stealth.net!news.stealth.net!nntp5.savvis.net!uunet!dfw.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: The Dreaded "Missing Subunits" Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Fri, 20 Sep 2002 14:01:07 GMT References: NNTP-Posting-Host: shell01.theworld.com Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.7/Emacs 20.7 Xref: archiver1.google.com comp.lang.ada:29219 Date: 2002-09-20T14:01:07+00:00 List-Id: Preben Randhol writes: > I didn't say you did if you see above. I am wondering what makes it > different to with a package before the body of another package versus > before the spec of another package. If you say: with Pack_1; package Mumble is ... end Mumble; with Pack_2; package body Mumble is ... end Mumble; then the name "Pack_1" is visible in both the spec and the body of Mumble. The name "Pack_2" is visible in the body of Mumble (but not in the spec of Mumble). It doesn't matter whether the above text is stored in one source file or two. (Some compilers don't *allow* it to be stored in one source file, without jumping through hoops (e.g., gnatchop), but that's not a language issue.) Another point is that the spec of Pack_1 cannot say "with Mumble;" because that would introduce a circularity, which is (annoyingly) illegal in Ada. The body of Pack_1 could say "with Mumble;", as could the spec or body of Pack_2. Again, this has nothing to do with source files. Does this answer your question? Also, look at the syntax rules for "compilation" and "compilation_unit". - Bob