comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: Importing a Unix function call
Date: 1998/12/06
Date: 1998-12-06T00:00:00+00:00	[thread overview]
Message-ID: <m3ogph5b2p.fsf@mheaney.ni.net> (raw)
In-Reply-To: 74e7t5$2deg$1@news.gate.net

"David Botton" <dbotton@hotmail.com> writes:

> Since in Ada non-scalar types are passed by reference (ie as pointers) to C
> functions you could get rid of the Access type and treat it just like C:

The file descriptor array is an out parameter.  The solution you propose
makes the array an in parameter.

I think this is another example of the fact that value-returning
subprograms (which we spell F-U-N-C-T-I-O-N in Ada) should be allowed to
have in out parameters.  

Clearly, what we want is the function

  function Pipe (Files : out File_Descriptor_Array) return Int;

but we can't express this thought using the language.







  reply	other threads:[~1998-12-06  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 ` Larry Kilgallen
1998-12-04  0:00   ` David Botton
1998-12-05  0:00     ` Larry Kilgallen
1998-12-04  0:00 ` dennison
1998-12-06  0:00 ` Matthew Heaney
1998-12-06  0:00   ` David Botton
1998-12-06  0:00     ` Matthew Heaney [this message]
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