Re: Converting Fortran module<->C++ structure



 DEVELOP > c-Plus-Plus > Re: Converting Fortran module<->C++ structure

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: "David Frank"
Date: 04 Dec 2003 06:11:02 AM
Object: Re: Converting Fortran module<->C++ structure
"Anonymous" <nospam@noISP.com> wrote in message
news:19yzb.416500$Fm2.424825@attbi_s04...

I have a mixed-language pgm (Fortran and C++) which needs to pass a

few

hundred values from C++ to Fortran. One way to do this is to have a
Fortran module and a C++ structure (or class) with an identical data
layout. I have used this idea with no problem, but it necessitates
making changes very carefully to the Fortran module and the C++
structure to keep them "in sync".

I am looking for a program which translates source files between

these

two formats; i e, takes a Fortran module source as input and

produces a

C++ structure source file as output, or vice versa. Then I will

maintain

one source file and run this hypothetical program before each build

to

produce the other source file.

Anyone know of such a program?

Thanks for any tips.

sherNOwoodSPAM@computer.org (remove caps to get e-mail)


If your C++ data declarations are C compatible
perhaps C2F can create a module from them.
http://home.cfl.rr.com/davegemini/C2F.ZIP
C2F.exe is a windows program
.

User: "Anonymous"

Title: Re: Converting Fortran module<->C++ structure 04 Dec 2003 10:27:28 AM
David Frank wrote:

If your C++ data declarations are C compatible
perhaps C2F can create a module from them.

http://home.cfl.rr.com/davegemini/C2F.ZIP

C2F.exe is a windows program

C2F produces no output when given a .h file with #defines as input, so
this pgm is not useful for my task.
sherNOwoodSPAM@computer.org (remove caps to get e-mail)
.
User: "David Frank"

Title: Re: Converting Fortran module<->C++ structure 04 Dec 2003 11:01:42 AM
"Anonymous" <nospam@noISP.com> wrote in message
news:QfJzb.225685$Dw6.802230@attbi_s02...

David Frank wrote:

If your C++ data declarations are C compatible
perhaps C2F can create a module from them.

http://home.cfl.rr.com/davegemini/C2F.ZIP

C2F.exe is a windows program


C2F produces no output when given a .h file with #defines as input,

so

this pgm is not useful for my task.

sherNOwoodSPAM@computer.org (remove caps to get e-mail)



try copying your .h file to a .c file
and when solicited for a filename dont include the .c extension
(its assumed)
and/or you can send me the file if you want me to try it..
.



  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER