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: a07f3367d7,e39fb6aac207c1a4 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!news.tornevall.net!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: calling ada from c with an array param Date: Mon, 21 Sep 2009 10:29:46 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: <0208bf86-cba9-45db-a43c-53c249bf9ae6@l34g2000vba.googlegroups.com> NNTP-Posting-Host: 25613465239d9d48f7c1e95672b3defe Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: b5e0d1d1d5d4e98eff6fda732cbb4c12 X-Complaints-To: abuse@tornevall.net X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: <0208bf86-cba9-45db-a43c-53c249bf9ae6@l34g2000vba.googlegroups.com> X-Validate-Post: http://news.tornevall.net/validate.php?trace=b5e0d1d1d5d4e98eff6fda732cbb4c12 X-SpeedUI: 1738 X-Complaints-Italiano: Parlo la lingua non � italiano User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) X-Posting-User: 9b22bfe2855937f9b3faeec7cfc91295 Xref: g2news2.google.com comp.lang.ada:8418 Date: 2009-09-21T10:29:46-07:00 List-Id: Mike wrote: > I'm new to Ada so I'm trying to expand a simple c example that passed > primitive types to an Ada > function. I'm trying to call an ada procedure from a c program with an > in out float array using GNAT. I read you should not use an > unconstrained array so I tried the following You should not be messing with mixed-language programming until you are no longer new to Ada. Much of your problem comes from the fact that you don't understand packages yet. When you do get to mixed-language programming, you should never use any types in your code that interfaces with C that are not declared in Interfaces.C and its children, or that are declared to be Convention C. -- Jeff Carter "It's all right, Taggart. Just a man and a horse being hung out there." Blazing Saddles 34