replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Modules in FORTRAN
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Modules in FORTRAN

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Wed Apr 10, 2013 4:21 pm    Post subject: Modules in FORTRAN Reply with quote

Can a module declared in one program be accessed by another program?
Back to top
View user's profile Send private message
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Wed Apr 10, 2013 5:18 pm    Post subject: Reply with quote

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.
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Thu Apr 11, 2013 12:37 pm    Post subject: Reply with quote

Thank you very much for the response.

I have another question

1) I have a software A
2) I have two FORTRAN programs F1 and F2
3) The software A is running both F1 and F2
4)The arrays declared in module are party generated by F1 and partly by F2.
5) Can the arrays generated by F1 be sued by F2 and vice versa

Christy
Back to top
View user's profile Send private message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Fri Apr 12, 2013 8:19 am    Post subject: Reply with quote

Pleaqse can anyone provide some insight?

Christy
Back to top
View user's profile Send private message
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Fri Apr 12, 2013 8:18 pm    Post subject: Reply with quote

Different programs cannot share variables in the way you have described.
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Sun Apr 14, 2013 10:17 am    Post subject: Reply with quote

Is there any way wherein different programs could share variables?
Back to top
View user's profile Send private message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Sun Apr 14, 2013 10:18 am    Post subject: Reply with quote

Is there any manner wherein different programs could share variables?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Sun Apr 14, 2013 2:36 pm    Post subject: Reply with quote

The short answer is YES but it is not easy.

For FTN95 see http://forums.silverfrost.com/viewtopic.php?t=1321
Back to top
View user's profile Send private message AIM Address
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Sun Apr 14, 2013 3:16 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Sun Apr 14, 2013 7:40 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group