From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6b3a3c920575b35a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news.glorb.com!koehntopp.de!news.stack.nl!feeds.news.ox.ac.uk!news.ox.ac.uk!feed2.jnfs.ja.net!feed1.jnfs.ja.net!jnfs.ja.net!xara.net!gxn.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: How to pass two dimensional arrays to C Date: Sat, 29 Jul 2006 08:11:47 +0100 Organization: Pushface Message-ID: References: <1154084819.088112.325730@p79g2000cwp.googlegroups.com> <1154119563.642347.13670@b28g2000cwb.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1154157107 7346 62.49.19.209 (29 Jul 2006 07:11:47 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sat, 29 Jul 2006 07:11:47 +0000 (UTC) Cancel-Lock: sha1:bDZd0xpy/T2A1QzdTlSgfwDJLu4= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news2.google.com comp.lang.ada:6010 Date: 2006-07-29T08:11:47+01:00 List-Id: "Jeffrey R. Carter" writes: > No, you need to create a collection of C-compatible 1D arrays, put > the rows of Z into them, and store C-compatible pointers to them in > the C-compatible 1D array of pointers. More like I would have thought that, provided you choose the right orientation, the rows would be as expected by C (ie contiguous values). In type M is array (Integer range <>, Integer range <>) of Float; -- Column Row the Row elements would be contiguous? (I can see there _might_ be compiler differences, and ISTR that GNAT has a way of specifying Fortran conventions). (perhaps that should be "aliased Float")