passing arrays from C to fortran

S

Shiv

Hi,

I am using a single C program and 25 fortran modules for my project.
The fortran module depend on the C program. I need to pass certrain
arrays from the C program to the Fortran module. I use Visual studio
2005 to compile all the programs. The array in the C program is being
stored in a structure. I tried defining the same structure in my
fortran module with commands like sequence, external etc which I saw
online. But it gave me syntax errors. It will be very great if
someone could help me
Thank you for your time.
Shiv
 
V

Victor Bazarov

Shiv said:
I am using a single C program and 25 fortran modules for my project.
The fortran module depend on the C program. I need to pass certrain
arrays from the C program to the Fortran module. I use Visual studio
2005 to compile all the programs. The array in the C program is being
stored in a structure. I tried defining the same structure in my
fortran module with commands like sequence, external etc which I saw
online. But it gave me syntax errors. It will be very great if
someone could help me

Are you offering employment, contract? Where is your contact
information? If you're not offering employment or are going to pay for
the work, show some effort ahead of time, post some code, simple, short,
both C and Fortran.

Oh, by the way, this newsgroup is not C. This is C++, and it's a
different language. 'comp.lang.c' is just down the corridor, to the left.

Good luck!

V
 
D

Default User

Shiv said:
Hi,

I am using a single C program and 25 fortran modules for my project.
The fortran module depend on the C program. I need to pass certrain
arrays from the C program to the Fortran module.


I have no particular experience with this. A quick search turned up
some sites:

<http://www.yolinux.com/TUTORIALS/LinuxTutorialMixingFortranAndC.html>

<http://www.physiology.wisc.edu/comp/docs/notes/not017.html>

<http://astro.berkeley.edu/~wright/f2c.html>

<http://www-mipl.jpl.nasa.gov/RTL/RTL_Manual-2_6.html>


I don't know if those would be of benefit or not.




Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top