comp.lang.ada
 help / color / mirror / Atom feed
From: "Jerry" <lanceboyle@qwest.net>
Subject: Re: How to use Annex G.3 Vectors and Matrices in bindings to C arrays
Date: 13 Nov 2006 02:48:32 -0800
Date: 2006-11-13T02:48:32-08:00	[thread overview]
Message-ID: <1163414912.339553.64220@f16g2000cwb.googlegroups.com> (raw)
In-Reply-To: 4556df7b$0$30610$426a74cc@news.free.fr


Yves Bailly wrote:
> Jerry wrote:
> > with arrays which are (sub)typed from the Annex G.3 declarations. For
> > example, here is the declaration from the spec of
> > Ada.Numerics.Generic_Real_Arrays which is GNAT file a-ngrear.ads:
>
> Sorry for this off-topic quesiton, but which GNAT version are you using ?
> I just can't find this file in GNAT-GPL...
>
I should have anticipated this. As I understand it, AdaCore has not put
the source for the new vector-matrix packages out yet. (I am using a
4.2 that someone on the MacAda.org site has provided, and the sources
are not in there.) But I found a nearly-complete set of sources here:
    http://www.martin.dowie.btinternet.co.uk/

> Have you tried:
> type A is array(1..10) of Float;
> pragma Convention(C, A);
>
Please see my reply to the next poster. (However, in GNAT, all arrays
are C-compatible, so the use of this pragma is useful only for
compatibility. I _hope_ I've used it, however.)

> The "pragma Convention" might be enough, at least it was when I did
> some OpenGL programming in Ada, passing Ada vectors or matrices to GL
> functions. It worked like a charm.
>




  reply	other threads:[~2006-11-13 10:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-12  3:45 How to use Annex G.3 Vectors and Matrices in bindings to C arrays Jerry
2006-11-12  8:45 ` Yves Bailly
2006-11-13 10:48   ` Jerry [this message]
2006-11-12 19:39 ` Jeffrey R. Carter
2006-11-13  7:09   ` tmoran
2006-11-13 11:20   ` Jerry
2006-11-13 17:42     ` Yves Bailly
2006-11-13 19:50       ` Gautier
2006-11-14  5:28         ` Jerry
2006-11-14  5:18       ` Jerry
2006-11-13 19:09     ` Jeffrey R. Carter
2006-11-14  7:31       ` Jerry
2006-11-14  7:54       ` Jerry
replies disabled

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