Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > passing arrays from C to fortran

Reply
Thread Tools

passing arrays from C to fortran

 
 
Shiv
Guest
Posts: n/a
 
      03-27-2009
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
 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      03-27-2009
Shiv wrote:
> 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
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
 
Reply With Quote
 
 
 
 
Default User
Guest
Posts: n/a
 
      03-27-2009
Shiv wrote:

> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing an array from FORTRAN to C then passing it within C andReturning it to FORTRAN deadpickle C Programming 1 11-07-2010 02:38 PM
Multidimensional arrays and arrays of arrays Philipp Java 21 01-20-2009 08:33 AM
Many Fortran code! How to call Fortran code from C/C++? Luna Moon C++ 9 09-04-2007 03:49 PM
Passing address of a C function to Fortran - syntax?? Adrian C Programming 5 11-27-2004 01:31 AM
Passing address of a C++ function to Fortran - syntax?? Adrian C++ 9 11-24-2004 06:19 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57