comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Interfaces.C + generics: stack overflow
Date: Thu, 23 Mar 2017 18:45:36 +0100
Date: 2017-03-23T18:45:36+01:00	[thread overview]
Message-ID: <ob11eh$je5$1@dont-email.me> (raw)
In-Reply-To: <ejhckeF1tg7U1@mid.individual.net>

On 03/23/2017 08:43 AM, hreba wrote:
>
> Now when pass the type real as a generic parameter:
>
> ---------------------------------------------------------------------
> generic
>    type Real is digits <>;
> package GSL is
> ...
> ---------------------------------------------------------------------
>
> and instanciate GSL with exactly the same type as above, I get a
> STORAGE_ERROR : stack overflow or erroneous memory access.

Where do you instantiate the package? Where do you declare the function you pass 
to Integration_QNG?

>    function gsl_integration_qng
>      (f: access GSL_Function;

This should not need to be an access parameter. It should be passed by reference 
as an "in" parameter. You can make it "in out" if you want.

-- 
Jeff Carter
"My little plum, I am like Robin Hood. I take from
the rich, and I give to the poor. ... Us poor."
Poppy
96


  parent reply	other threads:[~2017-03-23 17:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23  7:43 Interfaces.C + generics: stack overflow hreba
2017-03-23  7:46 ` hreba
2017-03-23 17:45 ` Jeffrey R. Carter [this message]
2017-03-24 12:20   ` hreba
2017-03-23 20:03 ` Randy Brukardt
2017-03-24 12:42   ` hreba
2017-03-24 20:13     ` Randy Brukardt
2017-03-24 22:03     ` Dmitry A. Kazakov
2017-03-25 14:17       ` hreba
2017-03-25 15:21         ` hreba
2017-03-26 22:34           ` Robert Eachus
2017-03-27  7:21             ` Dmitry A. Kazakov
2017-03-30 17:12               ` Robert Eachus
2017-03-25 15:23         ` Dmitry A. Kazakov
replies disabled

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