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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,124f89c41e690cd3,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!b28g2000cwb.googlegroups.com!not-for-mail From: "AskeyAJ@gmail.com" Newsgroups: comp.lang.ada Subject: Ada to Ada Pragma Export/Import Date: 9 Aug 2006 15:05:31 -0700 Organization: http://groups.google.com Message-ID: <1155161131.024343.273760@b28g2000cwb.googlegroups.com> NNTP-Posting-Host: 199.46.199.237 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1155161136 3764 127.0.0.1 (9 Aug 2006 22:05:36 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 9 Aug 2006 22:05:36 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 dfw-gate6.raytheon.com:8080 (Squid/2.4.STABLE7) Complaints-To: groups-abuse@google.com Injection-Info: b28g2000cwb.googlegroups.com; posting-host=199.46.199.237; posting-account=CYqfnw0AAAAF1B0yTvpOrbsgro2pqp2d Xref: g2news2.google.com comp.lang.ada:6131 Date: 2006-08-09T15:05:31-07:00 List-Id: 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? And what is the syntax required? I've tried the following but can't figure it out. Thanx much for any help. Andy askeyaj@gmail.com -------- with Text_Io; package Hello_Pkg is pragma Export (Ada, Say_It, "say_it"); -- CORRECT??? procedure Say_It; end Hello_Pkg; package body Hello_Pkg is procedure Say_It is begin Text_Io.Put_Line("Hello World."); end Say_It; end Hello_Pkg; with Hello_Pkg; procedure Test_Hello is pragma Import (Ada, Say_It, "say_it"); -- NOT SURE WHAT TO DO HERE begin Say_It; end Test_Hello;