Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

fortran sharing a common block

lugia
Beginner
562 Views

Hi.

I needsendsome 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 aCOMMON statement, but the second program doesn't receive these information. Somebody does know how to do this?

Thanks

WH

0 Kudos
2 Replies
joerg_kuthe
Novice
562 Views

If I understand you correctly you have two programs ("A.exe" and "B.exe") whose source code share at leastthe 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 inprogram 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 towrite those values toa file and read that in the other program.

qt

0 Kudos
Steven_L_Intel1
Employee
562 Views
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.
0 Kudos
Reply