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: a07f3367d7,d4984245154c8ef1 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder.news-service.com!newsfeed.straub-nv.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Interfacing C type, unconstrained array with record Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Sun, 17 Oct 2010 10:35:38 +0200 Message-ID: <18tt8tf57xd5m.10yh2wugb4eeo.dlg@40tude.net> NNTP-Posting-Date: 17 Oct 2010 10:35:39 CEST NNTP-Posting-Host: 28a57e10.newsspool1.arcor-online.net X-Trace: DXC=MYHjQ@DcSfhEB;5>eE0T7mic==]BZ:afn4Fo<]lROoRa<`=YMgDjhgbniX0T=6Vh`h[6LHn;2LCVn[ On Sat, 16 Oct 2010 12:19:18 -0700 (PDT), Ron Wills wrote: > The "pragma Convention" did the trick! I must say, Ada is the one > language I've encountered that seems to have the largest learning > curve because of the most cryptic references I ever seen ;) What you are doing is interfacing to another language. That is not Ada, but system programming. If you think pragma Convention cryptic, well, what about reading the compiler manual for call stack frame format details and implementing that using Assembler code insertions? (:-)) P.S. to dear ARG members. Why discrimnants cannot be mapped onto components of a C structure. I mean making OK this: type Vector is array (size_t range <>) of Whatever; � �pragma Convention (C, Vector); � �type Constrained (Size : size_t) is record � � �List� : Vector (1..Size); � �end record; � �pragma Convention (C, Constrained); -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de