Can a module declared in one program be accessed by another program?
Modules in FORTRAN
What do you mean?
A MODULE is a program unit declared and defined inside a Fortran source file. Provided the source file isn't the one containing your main PROGRAM, you can re-use the source file (and module) in as many programs as you like.
P.S. There can be more than one module in a source file if you like.
Thank you very much for the response.
I have another question
- I have a software A
- I have two FORTRAN programs F1 and F2
- The software A is running both F1 and F2 4)The arrays declared in module are party generated by F1 and partly by F2.
- Can the arrays generated by F1 be sued by F2 and vice versa
Christy
Pleaqse can anyone provide some insight?
Christy
Different programs cannot share variables in the way you have described.
Is there any way wherein different programs could share variables?
Is there any manner wherein different programs could share variables?
The short answer is YES but it is not easy.
For FTN95 see https://forums.silverfrost.com/Forum/Topic/1063
Thanks Paul.
IS this feature only in FTN 95 express or it also exists in Fortran 2003,Fortran 90?
Any ides-I shall be grateful.
Christy
It is not a feature of Standard Fortran. It is an extension in Silverfrost FTN95 based on Windows API functions so, in theory you can access the base functions from almost any compiler.