comp.lang.ada
 help / color / mirror / Atom feed
* Interfaces.Fortran
@ 1994-10-26 15:40 Kyongsuk Pace
  1994-10-26 22:28 ` Interfaces.Fortran Robert Dewar
  0 siblings, 1 reply; 4+ messages in thread
From: Kyongsuk Pace @ 1994-10-26 15:40 UTC (permalink / raw)


I tried to use pragma import in GNAT to use some Fortran programs.
However, pragma for Fortran is not implemented yet according to Robert
Dewar.  I read about interfaces.Fortran in one of Mike Feldman's postings
in info-Ada.  Can you tell me where I can get it and how to use it with
GNAT (i.e., does it require any changes before it will work)?  I am using
Sun Sparc.  Thank you.

Susie Pace
=====================================================================
    Kyongsuk Pace
    Fleet Numerical Meteorology and
    Oceanography Center                         pacek@fnoc.navy.mil
    7 Grace Hopper Ave, stop 1                  408-656-4367
    Monterey, CA 93943-5501                     fax:408-656-4489
=====================================================================



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

* Re: Interfaces.Fortran
  1994-10-26 15:40 Interfaces.Fortran Kyongsuk Pace
@ 1994-10-26 22:28 ` Robert Dewar
  1994-10-28 17:13   ` Interfaces.Fortran paus
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Dewar @ 1994-10-26 22:28 UTC (permalink / raw)


First, the usual reminder, please at least copy questions about GNAT to
gnat-report if you want them seen and answered by members of the devlopment
team!

Second, pragma interface FOrtran is not implemented, but are you sure you
need it! on most GCC targets it won't have any effect anyway.

Third, interfaces.fortran is implemented, though untested, but it is
basically unnecessary in the GNAT environment on most targets.

One thing to understand about the interfaces packages is that they are 
basically there to bridge the gap between language xyz data structures
and Ada data structures. Most of the time, in the GCC environment, no
such bridge is needed.

The best thing would be to send a message to gnat-report saying exactly
what you are interested in doing.




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

* Re: Interfaces.Fortran
  1994-10-26 22:28 ` Interfaces.Fortran Robert Dewar
@ 1994-10-28 17:13   ` paus
  1994-10-30 17:19     ` Interfaces.Fortran Robert Dewar
  0 siblings, 1 reply; 4+ messages in thread
From: paus @ 1994-10-28 17:13 UTC (permalink / raw)


In article <38ml76$e28@gnat.cs.nyu.edu> dewar@cs.nyu.edu (Robert Dewar) writes:
> 
> Second, pragma interface FOrtran is not implemented, but are you sure you
> need it! on most GCC targets it won't have any effect anyway.
> 
Robert,
are you shure? I'm also missing pragma interface Fortran (and even more
pragma export). On all UNIX systems that I know there is no problem
interfacing gcc code with the code from a non-gcc Fortran compiler.
So, pragma interface Fortran would help to make the interfacing to
Fortran code more elegant and would help to avoid doing this via pragma
interface C.

Michael

--
|----------------------------------------------------------------------|
|Dipl.-Ing. Michael Paus   (Member: Team Ada)                          |
|University of Stuttgart, Inst. of Flight Mechanics and Flight Control |
|Forststrasse 86, 70176 Stuttgart, Germany                             |
|Phone: (+49) 711-121-1434  FAX: (+49) 711-634856                      |
|Email: Michael.Paus@ifr.luftfahrt.uni-stuttgart.de (NeXT-Mail welcome)|



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

* Re: Interfaces.Fortran
  1994-10-28 17:13   ` Interfaces.Fortran paus
@ 1994-10-30 17:19     ` Robert Dewar
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Dewar @ 1994-10-30 17:19 UTC (permalink / raw)


Well sure, it would be neater to say pragma Interface (Fortran, and we will
certainly put that in soon, but it probably has the same effect as
pragma Interface (C, so it's an elegance issue, not a functoinality issue).

Now of course pragma Convention (Fortran, arr), where arr is a multi
dimensional array is more significant, because that causes proper column
wise storage. We don't have that in GNAT et, but definitely plan to
implement it.

Finally pragma export is indeed useful, and is definitely high on our
priority list. The valuable feature is the ability to specify link names.
Right now, all library entities in GNAT are by default exported with their
default names (all lower case with periods replaced by __ (double underline).

From C you can of course use these names directly, not very elegant, but
it certainly works (we use this extensively in GNAT, writing typically)

#define Enter_Name sem_util__enter_name

so that we can from then on use the "proper" name in the C code, but it
would certainly be nicer to be able to give a clean link name, and we
definitely have plans to implement this!

Note that the version of GNAT about to be released *does* finally have
pragma Import for variables, which will be useful.

So I don't know quite what you were asking me if I was sure about, but I
hope the above answers your questions.




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

end of thread, other threads:[~1994-10-30 17:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-10-26 15:40 Interfaces.Fortran Kyongsuk Pace
1994-10-26 22:28 ` Interfaces.Fortran Robert Dewar
1994-10-28 17:13   ` Interfaces.Fortran paus
1994-10-30 17:19     ` Interfaces.Fortran Robert Dewar

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