comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam@spam.com>
Subject: Re: Returning data from Ada to C
Date: Wed, 04 May 2005 04:49:09 GMT
Date: 2005-05-04T04:49:09+00:00	[thread overview]
Message-ID: <9vYde.5480$GQ5.3731@newsread1.news.pas.earthlink.net> (raw)
In-Reply-To: <1115164192.585409.163780@z14g2000cwz.googlegroups.com>

igor.kh@gmail.com wrote:
>   /* BTW, is it OK to use Ada allocated memory after `adafinal()'? */

No.

>   sols : C_Double_Array; -- This is probably wrong, but `sols' will be
>                          -- a C_Double_Array of some size.

This won't compile. C_Double_Array is an unconstrained array type. 
Objects must be constrained. You probably need

Sols : aliased C_Double_Array (<your constraint here);

> -- Now I want to return `rcnt' and `sols'
>   rcnt := rc;                -- This is the easy part.
>   solvec := ???              -- What goes here?

Solvec := Sols'Unchecked_Access;

-- 
Jeff Carter
"You tiny-brained wipers of other people's bottoms!"
Monty Python & the Holy Grail
18



  reply	other threads:[~2005-05-04  4:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-03 23:49 Returning data from Ada to C igor.kh
2005-05-04  4:49 ` Jeffrey Carter [this message]
2005-05-04 13:45   ` Igor Khavkine
2005-05-04 13:58     ` Alex R. Mosteo
2005-05-06  3:36     ` Jeffrey Carter
2005-05-07 22:12       ` igor.kh
2005-05-08  2:07         ` Jeffrey Carter
2005-05-08 19:58           ` Jeffrey Carter
2005-05-08  9:41         ` Martin Dowie
2005-05-08 14:55           ` Ludovic Brenta
2005-05-08 14:58             ` Ludovic Brenta
2005-05-09 22:49               ` igor.kh
2005-05-10 12:48                 ` Ludovic Brenta
2005-05-16  4:35   ` Dave Thompson
2005-05-16  5:03     ` 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