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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,91fb0c338516ed9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!newsfeed-east.nntpserver.com!nntpserver.com!manticore.nntpserver.com.POSTED!teranews!not-for-mail From: Martin Krischik Subject: Re: Getting length of array from C Newsgroups: comp.lang.ada Reply-To: martin@krischik.com References: <1107231381.627097.52490@c13g2000cwb.googlegroups.com> Organization: None User-Agent: KNode/0.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit NNTP-Posting-Date: Tue, 01 Feb 2005 03:00:08 EST Message-ID: <1107244808.d76a000ed3c64143f06cacb757120823@teranews> X-Abuse-Report: http://www.usenetabuse.com X-Abuse-Notes: Abuse reports must be submited via the usenetabuse.com portal listed above. X-Abuse-Notes2: Reports sent via any other method will not be processed. X-Abuse-Notes3: Any other abuse reporting headers in this article are fraudulent. Date: Tue, 01 Feb 2005 08:25:25 +0100 Xref: g2news1.google.com comp.lang.ada:8103 Date: 2005-02-01T08:25:25+01:00 List-Id: Chuck wrote: > Is there some way of getting an ada array length from C interface code? > I have to try and accomplish this while minimizing the number of > changes to the original Ada code. Any ideas? I did a lot of C interfacing and there are quite a few option open. Usualy you need two parameters one for the array one for the size. A very interesting hint - if you declare the following type inside a procedure: type C_Array is array 0 .. Number - 1 of Interfaces.C.int; then Number does not need to a constant. And of course the other way around as well: type Ada_Array is array 1 .. Number of Integer; Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com