comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Ada95 + FORTRAN 77
Date: 1999/09/06
Date: 1999-09-06T00:00:00+00:00	[thread overview]
Message-ID: <7r0ti3$v64$1@nnrp1.deja.com> (raw)
In-Reply-To: 37d3b7de@news1.prserv.net

In article <37d3b7de@news1.prserv.net>,
  "Matthew Heaney" <matthew_heaney@acm.org> wrote:
> In article <7r07rr$gap$1@nnrp1.deja.com> ,
lafage8770@my-deja.com  wrote:
>
> > procedure Adder (A : in Float; B: in Float; Sum : out
Float);
>
> You should be using the types in Interfaces.Fortran, and you
> should also have a pragma Convention.

Although this is true if you want to be sure to write code
that is portable between Ada 95 compilers, it is not really
necessary when using GNAT and g77, because the correspondence
between types (e.g. Real*4 and Float is in fact guaranteed).

It's always a bit of a difficult decision. The use of the types
in the interfaces packages often makes the interface a lot
heavier than it would be otherwise, so you have to make a
decision based on a trade off here.

The use of pragma Convention is a good idea anyway, because

a) it is syntactically light.

b) it warns the reader right away that Fortran is involved

c) if you have a compiler that properly implements annex G,
it also takes care of row- vs column- addressing of multi-dim
arrays.




Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




  reply	other threads:[~1999-09-06  0:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-06  0:00 Ada95 + FORTRAN 77 Preben Randhol
1999-09-06  0:00 ` lafage8770
1999-09-06  0:00   ` Preben Randhol
1999-09-06  0:00     ` Robert Dewar
1999-09-06  0:00       ` Preben Randhol
1999-09-06  0:00         ` Robert Dewar
1999-09-07  0:00           ` Preben Randhol
1999-09-08  0:00             ` Robert Dewar
1999-09-07  0:00       ` okellogg
1999-09-08  0:00         ` Robert Dewar
1999-09-06  0:00   ` Matthew Heaney
1999-09-06  0:00     ` Robert Dewar [this message]
1999-09-06  0:00 ` Gisle S�lensminde
1999-09-06  0:00   ` Preben Randhol
replies disabled

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