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,d5cbc012ac099061 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-19 16:09:19 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!lnsnews.lns.cornell.edu!newsstand.cit.cornell.edu!portc03.blue.aol.com!uunet!dca.uu.net!ash.uu.net!world!bobduff From: Robert A Duff Subject: Re: Non-Stub In Inner Scope? Sender: bobduff@world.std.com (Robert A Duff) Message-ID: Date: Sat, 19 May 2001 23:08:31 GMT References: Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: archiver1.google.com comp.lang.ada:7655 Date: 2001-05-19T23:08:31+00:00 List-Id: "David C. Hoos, Sr." 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