comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: The Dreaded "Missing Subunits"
Date: Fri, 20 Sep 2002 14:01:07 GMT
Date: 2002-09-20T14:01:07+00:00	[thread overview]
Message-ID: <wcc65x0oj4s.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: slrnaoljkv.nf.randhol+news@kiuk0156.chembio.ntnu.no

Preben Randhol <randhol+news@pvv.org> 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



  reply	other threads:[~2002-09-20 14:01 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-20  6:03 The Dreaded "Missing Subunits" Grein, Christoph
2002-09-20  7:30 ` Preben Randhol
2002-09-20 14:01   ` Robert A Duff [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-09-20  9:05 Grein, Christoph
2002-09-19 11:37 Grein, Christoph
2002-09-19  1:41 Alexandre E. Kopilovitch
2002-09-19 14:25 ` Peter Hermann
2002-09-12 22:49 Peter Richtmyer
2002-09-13  8:16 ` Peter Amey
2002-09-13  9:24   ` Emmanuel Briot
2002-09-13 20:46     ` Simon Wright
2002-09-14  0:25     ` Chad R. Meiners
2002-09-14  2:53     ` Robert A Duff
2002-09-14 20:20       ` Simon Wright
2002-09-16 13:48         ` Ted Dennison
2002-09-16 16:33           ` Keith Thompson
2002-09-17  2:42             ` Ted Dennison
2002-09-18 20:56           ` Robert A Duff
2002-09-19  8:26             ` Emmanuel Briot
2002-09-19  9:55             ` Preben Randhol
2002-09-19 10:53             ` Marc A. Criley
2002-09-19 11:26             ` Marin David Condic
2002-09-19 21:49             ` Dmitry A.Kazakov
2002-09-19  9:47               ` Preben Randhol
2002-09-20  2:42                 ` Dmitry A.Kazakov
2002-09-19 15:33                   ` Stephen Leake
2002-09-19 15:36                   ` Preben Randhol
2002-09-20 22:31                     ` Dmitry A.Kazakov
2002-09-16 15:10       ` Emmanuel Briot
2002-09-18 21:17         ` Robert A Duff
2002-09-18 22:41           ` Stephen Leake
2002-09-19  0:00             ` Robert A Duff
2002-09-19  1:39               ` Keith Thompson
2002-09-19 15:19                 ` Stephen Leake
2002-09-19  4:02               ` Larry Kilgallen
2002-09-19 15:24               ` Stephen Leake
2002-09-19 20:34               ` Randy Brukardt
2002-09-19 14:44           ` Peter Richtmyer
2002-09-19 20:25           ` Randy Brukardt
2002-09-13 17:15 ` Mark Johnson
2002-09-13 20:56 ` Stephen Leake
2002-09-13 20:58 ` Simon Wright
2002-09-16 17:28   ` Peter Richtmyer
2002-09-19 20:05     ` Brian Gaffney
replies disabled

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