comp.lang.ada
 help / color / mirror / Atom feed
From: sjw <simon.j.wright@mac.com>
Subject: Re: calling ada from c with an array param
Date: Mon, 21 Sep 2009 12:58:42 -0700 (PDT)
Date: 2009-09-21T12:58:42-07:00	[thread overview]
Message-ID: <26c2c304-2ae5-4400-b3dd-ad30914fb936@e18g2000vbe.googlegroups.com> (raw)
In-Reply-To: 0208bf86-cba9-45db-a43c-53c249bf9ae6@l34g2000vba.googlegroups.com

On Sep 20, 8:38 pm, Mike <michael_ta...@yahoo.com> wrote:

> extern void adainit (void);
> extern void adafinal (void);
> extern int conjunc (float[], int);

> --  conjunc.ads
> package conjunc is
>    type Float_Array is array (Integer range <>) of Float;
>    subtype Contrained_Float_Array is Float_Array (1 .. Integer'Last);
>    procedure conj (A: in out Constrained_Float_Array; Len: in
> Integer);
>    pragma Export (C, conj, "conj");
> end conjunc;

Is the C name of your function to be 'conjunc' (as in the C above) or
'conj' (as in the Ada)?
(probably a good idea to avoid using the name of the Ada package!)



      parent reply	other threads:[~2009-09-21 19:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-20 19:38 calling ada from c with an array param Mike
2009-09-20 19:59 ` Jan Andres
2009-09-21  8:04 ` Dmitry A. Kazakov
2009-09-21  8:08   ` Dmitry A. Kazakov
2009-09-21 17:29 ` Jeffrey R. Carter
2009-09-21 19:58 ` sjw [this message]
replies disabled

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