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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b16d5240727960c4 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: C bindings, Interfaces.C.Pointers etc. References: <4934218.sMSg6xXRUe@linux1.krischik.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Thu, 13 May 2004 22:42:46 GMT NNTP-Posting-Host: 63.184.0.169 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.pas.earthlink.net 1084488166 63.184.0.169 (Thu, 13 May 2004 15:42:46 PDT) NNTP-Posting-Date: Thu, 13 May 2004 15:42:46 PDT Xref: controlnews3.google.com comp.lang.ada:564 Date: 2004-05-13T22:42:46+00:00 List-Id: Dr. Adrian Wrigley wrote: > Thanks Martin for this suggestion. > > I have given (an approximation of) my code below. > > It doesn't use the I.C.Pointers package, and allows > Ada programs to access elements of the arrays using > standard array notation. The main problem is that > the bound Ada uses are over-sized, and simple use > of 'range and 'last will fall off the ends. Once you have an acceptable "oversized" Ada array, you can slice it to obtain a usable Ada array of the correct size. -- Jeff Carter "Sir Robin the-not-quite-so-brave-as-Sir-Lancelot, who had nearly fought the Dragon of Angnor, who nearly stood up to the vicious Chicken of Bristol, and who had personally wet himself at the Battle of Badon Hill." Monty Python & the Holy Grail 68