comp.lang.ada
 help / color / mirror / Atom feed
From: Jim Rogers <jimmaureenrogers@worldnet.att.net>
Subject: Re: "extern" procedure in ada
Date: Sat, 28 Sep 2002 02:28:29 GMT
Date: 2002-09-28T02:28:29+00:00	[thread overview]
Message-ID: <3D95138D.8080307@worldnet.att.net> (raw)
In-Reply-To: an2c4e$52l$1@dns3.cae.ca

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






  reply	other threads:[~2002-09-28  2:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-27 19:40 "extern" procedure in ada Bernard Azria
2002-09-28  2:28 ` Jim Rogers [this message]
2002-09-28  3:13 ` SteveD
2002-09-28  3:47 ` sk
2002-09-30 14:37 ` Stephen Leake
2002-09-30 22:39   ` Bernard Azria
2002-10-01 19:57     ` Simon Wright
2002-10-02  1:49       ` Jeffrey Carter
2002-10-02 15:13         ` Bernard Azria
2002-10-02 18:56           ` Jeffrey Carter
replies disabled

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