comp.lang.ada
 help / color / mirror / Atom feed
* Re: The Dreaded "Missing Subunits"
@ 2002-09-19 11:37 Grein, Christoph
  0 siblings, 0 replies; 44+ messages in thread
From: Grein, Christoph @ 2002-09-19 11:37 UTC (permalink / raw)


> Here's a better idea than a file extension convention: Why not have all Ada
> compilers allow the user to specify what the convention is for their
> project? Most of the compilers I've seen have some ability already to store
> configuration or initialization information in some manner. If its a
> command-line compiler (id est, Gnat) it could be a switch set by the IDE or
> there can be some special file for a project that identifies the convention
> as well as other useful initialization & option stuff.

Gnat project files (3.15) to work with Rational file name convention:

File name apex.gpr
------------------
project Apex is

  for Source_Dirs use ();

  package Naming is

    for Casing                        use "lowercase";
    for Dot_Replacement               use ".";
    for Specification_Suffix  ("Ada") use ".1.ada";
    for Implementation_Suffix ("Ada") use ".2.ada";

  end Naming;

end Apex;



^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: The Dreaded "Missing Subunits"
@ 2002-09-20  9:05 Grein, Christoph
  0 siblings, 0 replies; 44+ messages in thread
From: Grein, Christoph @ 2002-09-20  9:05 UTC (permalink / raw)


> ... I am wondering what makes it
> different to with a package before the body of another package versus
> before the spec of another package.

Not clear what you mean by "before". A context clause applies to a spec or a body.

with A; package B is ...
with C; package body B is ...

Here you have visibility to A in both, spec and body; visibility to C only in 
the body. But I gather that's clear to you, it's so basic. So what's your 
question? And no, it does not matter whether the above in stored in one or in 
two 
files.



^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: The Dreaded "Missing Subunits"
@ 2002-09-20  6:03 Grein, Christoph
  2002-09-20  7:30 ` Preben Randhol
  0 siblings, 1 reply; 44+ messages in thread
From: Grein, Christoph @ 2002-09-20  6:03 UTC (permalink / raw)


> >> Besides don't you get the with-ing problem with .ada?
> > 
> > Why? It worked with Ada 83, why shouldn't it with Ada 95.
> 
> I don't know how the .ada works, but sometimes you have to with in the
> .adb and not the .ads to avoid circular dependance. But I guess you can
> put the withs after the spec and the compiler will recognice this?

This is a misconception. It's no language concern how you store Ada units. Whether you store specs and bodies in one file or separately does not affect the 
semantics.

And you do not "with" .ads, .adb, or .ada _files_, you with Ada units.

Having specs and bodies separate is ony a convention of some compiler vendors.



^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: The Dreaded "Missing Subunits"
@ 2002-09-19  1:41 Alexandre E. Kopilovitch
  2002-09-19 14:25 ` Peter Hermann
  0 siblings, 1 reply; 44+ messages in thread
From: Alexandre E. Kopilovitch @ 2002-09-19  1:41 UTC (permalink / raw)


Robert A Duff <bobduff@shell01.TheWorld.com> wrote:
>Contrast with Ada, where GNAT wants .ads/.adb, Rational wants
>.1.ada/.2.ada, and AdaMagic wants .spc/.bdy.

Total number of Ada compilers is less that 10, AFAIK. It seems to be quite
inexpensive for each of them to recognize filename extensions of others when
a programmer asks for that with an appropriate compiler option.




^ permalink raw reply	[flat|nested] 44+ messages in thread
* The Dreaded "Missing Subunits"
@ 2002-09-12 22:49 Peter Richtmyer
  2002-09-13  8:16 ` Peter Amey
                   ` (3 more replies)
  0 siblings, 4 replies; 44+ messages in thread
From: Peter Richtmyer @ 2002-09-12 22:49 UTC (permalink / raw)


I love the Gnat compiler but...

   I dread this error message:

   "No code generated for file xxxx.2.ada (missing subunits)"

It means that I have a procedure or function declared "...is separate;"
in package xxxx, but there is no matching separate. A "legacy" package 
has a gazillion separates. They need changes, and the calling 
parameters get changed and don't match, or the routine name changes, 
or the separate filename isn't right, or whatever happens to get this 
message, and it is a real pain to figure out which "subunit" is missing.

Anybody have a solution? maybe a compile switch or ...?

thanks,
Peter
 
(I know he isn't reading this but, Robert, I did try to read the docs!)



^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2002-09-20 22:31 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-19 11:37 The Dreaded "Missing Subunits" Grein, Christoph
  -- strict thread matches above, loose matches on Subject: below --
2002-09-20  9:05 Grein, Christoph
2002-09-20  6:03 Grein, Christoph
2002-09-20  7:30 ` Preben Randhol
2002-09-20 14:01   ` Robert A Duff
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

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