From: "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org>
Subject: Re: How to pass two dimensional arrays to C
Date: Fri, 28 Jul 2006 20:15:17 GMT
Date: 2006-07-28T20:15:17+00:00 [thread overview]
Message-ID: <pfuyg.105539$1i1.81233@attbi_s72> (raw)
In-Reply-To: <1154084819.088112.325730@p79g2000cwp.googlegroups.com>
Jerry wrote:
> In my project to write a binding for a popular plotter written in C,
> I've hit a brick wall and the problem might be associated with passing
> two-dimensionaal arrays to C. I'm using GNAT on OS X and Xcode. I can
> pass one-dimensional arrays OK. Here are the pertinent parts from an
> example where the problem happens:
C doesn't have 2D arrays, as you've been told. You might try a 1D array
of 1D arrays in Ada, but I suspect you're going to have to get very low
level and ugly and pass a C-compatible 1D array of C-compatible pointers
to C-compatible 1D arrays. You should hide this away somewhere where it
will never be found by the rest of the application.
--
Jeff Carter
"Don't knock masturbation. It's sex with someone I love."
Annie Hall
45
next prev parent reply other threads:[~2006-07-28 20:15 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-28 11:06 How to pass two dimensional arrays to C Jerry
2006-07-28 12:27 ` Jeffrey Creem
2006-07-28 12:27 ` Dmitry A. Kazakov
2006-07-28 16:53 ` Adam Beneschan
2006-07-28 20:15 ` Jeffrey R. Carter [this message]
2006-07-28 20:46 ` Jerry
2006-07-28 21:14 ` Jeffrey Creem
2006-07-28 22:54 ` Björn Persson
2006-07-29 1:14 ` Jeffrey R. Carter
2006-07-29 7:11 ` Simon Wright
2006-07-29 22:12 ` Jeffrey R. Carter
2006-07-30 11:18 ` Simon Wright
2006-07-30 11:20 ` Simon Wright
2006-07-29 4:19 ` REH
2006-07-29 4:28 ` REH
2006-07-29 4:30 ` REH
2006-08-14 6:59 ` Dave Thompson
2006-07-29 5:47 ` REH
2006-08-02 8:20 ` Jerry
2006-08-02 9:03 ` Dmitry A. Kazakov
2006-08-02 10:22 ` Jerry
2006-08-02 18:25 ` Björn Persson
2006-08-05 1:03 ` 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