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-Thread: 103376,124f89c41e690cd3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!atl-c08.usenetserver.com!news.usenetserver.com!pc03.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Ada to Ada Pragma Export/Import References: <1155161131.024343.273760@b28g2000cwb.googlegroups.com> From: Stephen Leake Date: Thu, 10 Aug 2006 08:00:11 -0400 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:gAj7WXr1gX9sFfA0M4u3wcFqCDM= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: c6d6244db1fd1759e00d406126 Xref: g2news2.google.com comp.lang.ada:6151 Date: 2006-08-10T08:00:11-04:00 List-Id: "AskeyAJ@gmail.com" writes: > I need to deliver object files (coded in Ada) to another team who will > access the public routines in their Ada code. I cannot deliver the > package bodies (but can deliver the object files, the specs, and the > ALI files). For example, suppose I want do deliver the hello_pkg.o and > hello_pkg.ads from the code below. > > My assumption is that I need to export the Say_It procedure in the > spec, and then the other team would need to import this procedure into > their code. Is this correct? No. just deliver a normal Ada spec; see below. package Hello_Pkg is procedure Say_It; end Hello_Pkg; with Ada.Text_Io; package body Hello_Pkg is procedure Say_It is begin Ada.Text_Io.Put_Line("Hello World."); end Say_It; end Hello_Pkg; with Hello_Pkg; procedure Test_Hello is begin Hello_Pkg.Say_It; end Test_Hello; -- -- Stephe