comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Interfacing C type, unconstrained array with record
Date: Sun, 17 Oct 2010 10:35:38 +0200
Date: 2010-10-17T10:35:39+02:00	[thread overview]
Message-ID: <18tt8tf57xd5m.10yh2wugb4eeo.dlg@40tude.net> (raw)
In-Reply-To: ea2bf467-ca86-42db-ae4c-7c462b4889fd@l8g2000yql.googlegroups.com

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



  parent reply	other threads:[~2010-10-17  8:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-16 17:35 Interfacing C type, unconstrained array with record Ron Wills
2010-10-16 18:36 ` Dmitry A. Kazakov
2010-10-16 19:19   ` Ron Wills
2010-10-16 22:15     ` Jeffrey Carter
2010-10-17 10:20       ` Simon Wright
2010-10-17 12:38         ` Robert A Duff
2010-10-17  8:35     ` Dmitry A. Kazakov [this message]
2010-10-17 12:30       ` Robert A Duff
2010-10-16 21:41   ` Robert A Duff
2010-10-16 23:34     ` tmoran
2010-10-17  6:59     ` J-P. Rosen
2010-10-17 12:34       ` Robert A Duff
2010-10-17  7:45     ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox