Welcome to Intel® Software Network Quick Login | Join | Help |
Search in Intel® Software Network Forums
in Go

fortran sharing a common block

Last post 05-06-2008, 1:05 PM by Steve Lionel. 2 replies.
Sort Posts: Previous Next
 05-06-2008, 10:37 AM 30254212  

fortran sharing a common block

Hi.

I need send some informations (open file name, path and numeric values) obtained in a program to another independent program created in the same workspace. I'm tried to do this using a COMMON statement, but the second program doesn't receive these information. Somebody does know how to do this?

Thanks

WH

 
 05-06-2008, 11:27 AM 30254214 in reply to 30254212  

Re: fortran sharing a common block

If I understand you correctly you have two programs ("A.exe" and "B.exe") whose source code share at least the same COMMON block. When program A is executing and is changing a value in a COMMON block variable, do you expect that change to happen in program B too? If this is what you want, you should have a look at the IVF online-help: search in the Index for "sharing data using Fortran DLLs". Probably it is easier to write those values to a file and read that in the other program.

qt

 
 05-06-2008, 1:05 PM 30254222 in reply to 30254214  

Re: fortran sharing a common block

Intel Visual Fortran provides a "DLL_Shared_Data" sample that demonstrates this.  I think the OP is using CVF, though. CVF has a "DLLEXP2" sample which illustrates the same technique, though it's harder to understand.

Steve

Doctor Fortran: intel.com/software/drfortran
 
View as RSS news feed in XML

Shortcuts


Tags For This Post

...

Community Tags

...