comp.lang.ada
 help / color / mirror / Atom feed
* Ada to Ada Pragma Export/Import
@ 2006-08-09 22:05 AskeyAJ
  2006-08-09 23:26 ` Jeffrey Creem
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: AskeyAJ @ 2006-08-09 22:05 UTC (permalink / raw)


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;




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

end of thread, other threads:[~2006-08-11 16:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-09 22:05 Ada to Ada Pragma Export/Import AskeyAJ
2006-08-09 23:26 ` Jeffrey Creem
2006-08-09 23:48 ` Georg Bauhaus
2006-08-10 12:00 ` Stephen Leake
2006-08-10 13:06 ` gautier_niouzes
2006-08-10 16:49 ` Martin Krischik
2006-08-11 14:02   ` AskeyAJ
2006-08-11 14:22     ` Ludovic Brenta
2006-08-11 16:55       ` AskeyAJ
2006-08-11 16:35     ` Martin Krischik
2006-08-11 16:58       ` AskeyAJ

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