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,d0fcd3db00d6036 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-27 19:28:31 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn4feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3D95138D.8080307@worldnet.att.net> From: Jim Rogers User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: "extern" procedure in ada References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 28 Sep 2002 02:28:29 GMT NNTP-Posting-Host: 12.86.32.145 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1033180109 12.86.32.145 (Sat, 28 Sep 2002 02:28:29 GMT) NNTP-Posting-Date: Sat, 28 Sep 2002 02:28:29 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:29396 Date: 2002-09-28T02:28:29+00:00 List-Id: Bernard Azria wrote: > I am looking for the equivallent of an "extern" definition procedure in > C for ADA. > > In other words, how could I define an external procedure to my program > without "withing" the package where it is defined ( I have only the "obj' > and the "ali" file of this procedure in a library) > > Would it be an kind of : pragma import ( ADA, procedure_name ) > You would "with" the package containing the procedure. You seem to think that the Ada "with" mechanism is similar to the C #include mechanism. It is not. The Ada "with" mechanism is designed to specifically support separate compilation. You still need the package specification to perform a "with" so that the compiler can check the validity of your references to identifiers from the foreign package. The ".ali" file is not helpful. It primarily specifies linker instructions. It is a product of the GNAT compiler, not a source file used by the GNAT compiler. Jim Rogers