comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Re: Importing a Unix function call
Date: 1998/12/04
Date: 1998-12-04T00:00:00+00:00	[thread overview]
Message-ID: <749q8c$2kn$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 36683FA3.2512DECF@ndirect.co.uk

In article <36683FA3.2512DECF@ndirect.co.uk>,
  Steve Crowe <stevecrowe@ndirect.co.uk> wrote:
> Someone has bound to have done this before... hopefully.
>
> Using Ada to import a function is easy, but if the function parameter
> returns
> a value, how is the Ada error overcome.  As I want the return value as
> well
> as the out parameter.  Is there away round this using a pragma?
>
> GNAT AdA compiler running under Unix, the function being imported is a
> Unix 'pipe'.

If you are using gnat, you can use pragma Import_Valued_Procedure.

The portable way around this problem is to pass the parameters the same way C
does: all "in"s, with some being pointer objects. C doesn't have "out"
parameters either, you know.

--
T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  reply	other threads:[~1998-12-04  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-04  0:00 Importing a Unix function call Steve Crowe
1998-12-04  0:00 ` dennison [this message]
1998-12-04  0:00 ` Larry Kilgallen
1998-12-04  0:00   ` David Botton
1998-12-05  0:00     ` Larry Kilgallen
1998-12-06  0:00 ` Matthew Heaney
1998-12-06  0:00   ` David Botton
1998-12-06  0:00     ` Matthew Heaney
1998-12-07  0:00       ` dennison
replies disabled

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