comp.lang.ada
 help / color / mirror / Atom feed
* Ada Function Return Values to C
@ 1996-07-04  0:00 Nigel J. Tracey
  1996-07-06  0:00 ` Robert Dewar
  0 siblings, 1 reply; 2+ messages in thread
From: Nigel J. Tracey @ 1996-07-04  0:00 UTC (permalink / raw)



Hi,

I have a simple Ada function which takes in a number of
parameters and calculates a DOUBLE result (from the
INTERFACES.C package) and then returns this. The problem
I'm having is that the value which gets back to the C
code (which called the Ada code) bares no relation to
the value calculated.

If I change the function to a procedure with an out
parameter and pass an address of a double in the C
routine which calls the Ada it all works fine! Returning
INTEGER values from the function also works perfectly!

Anybody have any ideas as to the problem, the
compiler is GNAT 3.05 and GCC 2.7.2 on Linux 1.2.13
Has anybody got GNAT to return FLOATS or DOUBLES back
to C routines?

Any help would be much appreciated.

Cheers,

	Nigel.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-07-06  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-04  0:00 Ada Function Return Values to C Nigel J. Tracey
1996-07-06  0:00 ` Robert Dewar

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