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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c1bdceb867926fdb X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!k19g2000yqc.googlegroups.com!not-for-mail From: Ada novice Newsgroups: comp.lang.ada Subject: Re: Interfacing Ada with C Date: Sat, 24 Jul 2010 11:04:18 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <8my12mw8eviw$.q38bp6e79qfh.dlg@40tude.net> NNTP-Posting-Host: 193.11.22.91 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1279994659 21971 127.0.0.1 (24 Jul 2010 18:04:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 24 Jul 2010 18:04:19 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k19g2000yqc.googlegroups.com; posting-host=193.11.22.91; posting-account=Rr9I-QoAAACS-nOzpA-mGxtAlZ46Nb6I User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:12530 Date: 2010-07-24T11:04:18-07:00 List-Id: On Jul 24, 6:44=A0pm, "Dmitry A. Kazakov" wrote: > Since C does not have arrays, especially 2D ones, you will have some cust= om > representation on the C side. It means that examples of bindings (there a= re > plenty of) won't help you unless you understand how you describe a > C-compatible object in Ada. Thanks for the "warnings". One way that I'm thinking is to write the elements of the matrix sequentially into a file in Ada, read them into C, put them into a matrix in C, do the appropriate computations in C (with the IMSL C library), write the output in C in a file, and finally importing them back into Ada again for further processing. Of course, having several read-write operations is not computationally time-efficient but this is a modest way to get starting. I know C at a basic level and I'm not not an extensive user. YC