comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Non-Stub In Inner Scope?
Date: Sat, 19 May 2001 23:08:31 GMT
Date: 2001-05-19T23:08:31+00:00	[thread overview]
Message-ID: <wccg0e1szrk.fsf@world.std.com> (raw)
In-Reply-To: z2CN6.660$ce.1111604@newsrump.sjc.telocity.net

"David C. Hoos, Sr." <david.c.hoos.sr@ada95.com> writes:

> Just move the stub outside of the subprogram which now encloses it.

Yes, or put Wont_Work into a child package.

> > I'm having trouble with the problem of separate compilation.  If I
> > try this:
> >
> >     with Ada.Text_Io;
> >     package body Example is
> >        procedure Put_Line(Text: String) is
> >           function Wont_Work(Text: String) return String is separate;
> >        begin
> >           Ada.Text_Io.Put_Line(Wont_Work(Text));
> >        end Put_Line;
> >     end Example;

If Put_Line were also a subunit, it would work.  There's no particularly
good reason for it to work this way (IMHO), but that's the way it is:
you can't have a subunit more deeply nested like that.

But I generally prefer child units to subunits anyway...

- Bob



  reply	other threads:[~2001-05-19 23:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-19 21:42 Non-Stub In Inner Scope? Dr Nancy's Sweetie
2001-05-19 22:01 ` David C. Hoos, Sr.
2001-05-19 23:08   ` Robert A Duff [this message]
2001-05-20 10:50   ` RPrice9979
2001-05-20  3:15 ` Jeffrey Carter
2001-05-20 12:29 ` Marc A. Criley
2001-05-20 20:07   ` David C. Hoos, Sr.
replies disabled

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