Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: lionel@quark.enet.dec.com (Steve Lionel)
Subject: Re: passing between C and Fortran
Date: 1995/11/16	[thread overview]
Message-ID: <48foif$lk3@zk2nws.zko.dec.com> (raw)
In-Reply-To: 48aa3t$9im@news.cea.fr


In article <48aa3t$9im@news.cea.fr>, francois CARTIER 
<cartier@lcus15.saclay.cea.fr> writes:
|>I have a C program calling Fortran functions, and inside the Fortran,
|>i need to call some C functions.
|>My programs comes from HPUX and i have to compile it on OSF1.
|>But the f77 compiler isn't very happy with my source file..
|>any help ?

In the current (V3.8) release of DEC Fortran, there's the CDEC$ ALIAS
directive which is similar to the $ALIAS directive in HP's Fortran, though
it specifies the name alias only, not the passing mechanism.  Your Fortran
code would look like this:


CDEC$ ALIAS recupfort,'recupfort'

     integer function essaifort()
     integer ii=123

     call recupfort(%val(ii))
     return
     end

The next version of Digital Fortran will include a new directive that will give
you the ability to say "this is the name of a C routine" and it will apply
C naming and passing-mechanism semantics automatically.
-- 

Steve Lionel                      Mail: lionel@quark.enet.dec.com
DEC Fortran Development           WWW:  http://www.digital.com/info/slionel.html
Digital Equipment Corporation     CompuServe: 75263,3001
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698             "Free advice is worth every cent"

For information on DEC Fortran 90, see http://www.digital.com/info/hpc/f90/



      parent reply	other threads:[~1995-11-16  5:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-11-14  5:00 passing between C and Fortran francois CARTIER
1995-11-15  5:00 ` Juergen Fuhrmann
1995-11-16  5:00 ` Shlenov Svyatoslav
1995-11-16  5:00 ` Steve Lionel [this message]
read-only archive

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