comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Ada array vs C pointer (call by reference)
Date: Fri, 27 Jun 2008 19:17:08 -0700 (PDT)
Date: 2008-06-27T19:17:08-07:00	[thread overview]
Message-ID: <94d42cb1-3483-4371-a41f-5e265aa793e7@x19g2000prg.googlegroups.com> (raw)
In-Reply-To: 5d649522-50be-4aa5-9dce-cd1daa2bcd0d@p39g2000prm.googlegroups.com

On Jun 27, 6:15 pm, Adrian Hoe <aby...@gmail.com> wrote:

> Like those previous posts in this thread (by Maciej, Keith, et al), it
> depends on compiler implementation. The question is, the C library
> (which I am interfacing with) is compiled by unknown C compiler with
> unknown switches and the author cannot be contacted. The only
> documentation I have is the C header file.

Got a good disassembler?

If it really isn't documented what type of floats it's expecting, and
you have no way to determine what C compiler was being used, you're
pretty much down to looking at the disassembled code to figure out how
it works, or just trying different possibilities with small data
samples where you know what the correct result will be, and trying it
with different float sizes until you get the right result.  I don't
know what sort of different answer you were expecting.  Ada is a
programming language, not a magician.  Nobody here is suggesting that
in a case like this, that the Ada compiler should be able to figure
out how to interface to your library; and if you think they were,
you're overinterpreting.

Furthermore, even if there were some configuration information in the
library itself (such as debug information in a symbol table or DWARF
section) that gives information on the expected parameters, there is
certainly no language requirement that the Ada compiler go delve into
the library file to figure this out, and I doubt that any Ada compiler
would actually do so.  You're on your own, there.

                             -- Adam




  reply	other threads:[~2008-06-28  2:17 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-27  1:39 Ada array vs C pointer (call by reference) Adrian Hoe
2008-06-27  1:42 ` Adrian Hoe
2008-06-27  2:55 ` Adam Beneschan
2008-06-27 13:02   ` Maciej Sobczak
2008-06-27 13:15     ` Adrian Hoe
2008-06-27 14:43     ` Georg Bauhaus
2008-06-27 14:47       ` Georg Bauhaus
2008-06-27 20:35       ` Maciej Sobczak
2008-06-27 22:00         ` Georg Bauhaus
2008-06-27 22:46           ` Keith Thompson
2008-06-27 16:11     ` Keith Thompson
2008-06-27 17:00       ` Robert A Duff
2008-06-27 18:15         ` Keith Thompson
2008-06-28 14:02         ` Stephen Leake
2008-06-28 21:18           ` Keith Thompson
2008-07-03 12:44         ` Rob Norris
2008-06-27 20:44       ` Maciej Sobczak
2008-06-27 22:14         ` Keith Thompson
2008-06-27 22:36           ` Adam Beneschan
2008-06-28 14:04             ` Stephen Leake
2008-06-28 21:22               ` Keith Thompson
2008-06-30 17:13               ` Adam Beneschan
2008-06-28 17:52             ` Robert A Duff
2008-06-30 17:13               ` Adam Beneschan
2008-06-30 18:55                 ` Robert A Duff
2008-07-01 21:19                 ` Randy Brukardt
2008-07-01 21:19                 ` Randy Brukardt
2008-06-28  0:56         ` Peter C. Chapin
2008-06-28 14:11           ` Maciej Sobczak
2008-06-28 17:49             ` tmoran
2008-06-28 21:46             ` Keith Thompson
2008-06-28 17:44         ` Robert A Duff
2008-07-01 21:10       ` Randy Brukardt
2008-06-27 18:13     ` tmoran
2008-06-27 20:49       ` Maciej Sobczak
2008-06-27  4:10 ` Jeffrey R. Carter
2008-06-27  8:22   ` Adrian Hoe
2008-06-27 15:07     ` Adam Beneschan
2008-06-27 22:54     ` Jeffrey R. Carter
2008-06-28  1:15       ` Adrian Hoe
2008-06-28  2:17         ` Adam Beneschan [this message]
2008-07-01 21:31           ` Randy Brukardt
2008-07-01 21:31           ` Randy Brukardt
2008-08-22  4:06           ` Adrian Hoe
2008-06-28  4:59         ` Jeffrey R. Carter
2008-06-29  3:48         ` anon
2008-06-28  1:21 ` anon
replies disabled

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