From: tmoran@bix.com
Subject: Re: Question about interfacing C and Ada95
Date: 1999/11/08
Date: 1999-11-08T00:00:00+00:00 [thread overview]
Message-ID: <zDFV3.101$Wi2.9657@typhoon-sf.snfc21.pbi.net> (raw)
In-Reply-To: 806ud0$lu1$1@trog.dera.gov.uk
>we have recoded the c to this as Ada funcs do not allow more than
>one return val;
>
>void getX ( void **instance, int *float, int *error );
>
>How do I then write the Ada to interface to this in Ada 95.
procedure getX(M : in out Matrix;
Float : in out integer;
Error : out integer);
or so, depending on just what you want.
Actually, both Ada and C allow a single return value from a
function, ie "result = getX(....);", but Ada in addition allows
"out" or "in out" parameters to procedures, which in C must be
simulated by passing "in" a pointer to the target parameter.
next prev parent reply other threads:[~1999-11-08 0:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-08 0:00 Question about interfacing C and Ada95 Hovers
1999-11-08 0:00 ` Robert Dewar
1999-11-09 0:00 ` Hovers
1999-11-09 0:00 ` Ted Dennison
1999-11-12 0:00 ` Hovers
1999-11-12 0:00 ` Robert Dewar
1999-11-12 0:00 ` Ted Dennison
1999-11-13 0:00 ` Robert Dewar
1999-11-09 0:00 ` Matthew Heaney
1999-11-08 0:00 ` Matthew Heaney
1999-11-08 0:00 ` tmoran [this message]
1999-11-09 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox