From: mheaney@on2.com (Matthew Heaney)
Subject: Re: Ada to 'C' parameter passing problem
Date: 19 Feb 2003 18:36:38 -0800
Date: 2003-02-20T02:36:39+00:00 [thread overview]
Message-ID: <1ec946d1.0302191836.743eab91@posting.google.com> (raw)
In-Reply-To: cf2c6063.0302181150.55991a7e@posting.google.com
rod.chapman@praxis-cs.co.uk (Rod Chapman) wrote in message news:<cf2c6063.0302181150.55991a7e@posting.google.com>...
> Pat.Donahue@msfc.nasa.gov (Patrick) wrote in message news:<ea3b54bb.0302180739.3cb6c159@posting.google.com>...
> > I am using GNAT Ada on Linux. I am trying to port from a Sun
> > (Solaris) implementation. I didn't write the Ada or 'C' myself, but
> > am trying to make it work on Linux.
> <snip>
>
> This code looks mildly horrible. All that messing about with
> 'Address and Unchecked_Conversion is in very poor style.
>
> My advice:
>
> 4) A C function that has multiple side-effects via
> by-reference parameters shouldn't
> be a function in Ada at all - it's a procedure!
No, Rod, it's a subprogram that returns a value. There is no
difference between a function and a procedure, except for syntax.
That Ada doesn't allow you to specify inout mode for function
parameters is a deficiency of Ada, especially since it advertises
itself as a language that is supposed to facilitate inter-language
programming.
next prev parent reply other threads:[~2003-02-20 2:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-18 15:39 Ada to 'C' parameter passing problem Patrick
2003-02-18 16:47 ` Jeffrey Carter
2003-02-18 19:50 ` Rod Chapman
2003-02-20 2:36 ` Matthew Heaney [this message]
2003-02-20 9:18 ` Rod Chapman
2003-02-20 9:43 ` Dmitry A. Kazakov
2003-02-20 22:05 ` Simon Wright
2003-02-21 9:53 ` Stuart Palin
2003-02-21 17:39 ` Jeffrey Carter
2003-02-21 18:12 ` Warren W. Gay VE3WWG
2003-02-21 20:25 ` Randy Brukardt
2003-02-24 23:53 ` Matthew Heaney
2003-02-25 17:21 ` Rod Chapman
-- strict thread matches above, loose matches on Subject: below --
2003-02-21 16:52 Lionel.DRAGHI
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox