• HOME
  • PUBLICATIONS
  • RESEARCH INTERESTS
  • CONTACTS
  • Teaching
  • RANDOM WORDS
  • FORTRAN .... OF COURSE!
  • Contents (Fortran)
go back to the content section

External Procedures: functions, subroutines & modules in Fortran

Creative Commons License
Tutorials on Fortran by www.giuseppeforte.me is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

    Join The Fortran Newsletter

Subscribe to Newsletter
In this example I quickly review the example Montecarlo evaluation of π, introducing the concepts of functions, subroutines and modules in Fortran. Such concepts are not actually fundamentals and they can be neglected and still it would be possible to code a well working scientific program. However, external procedure improve the customization of the program, which is a must, especially when two or more people are working on the same code.
EXAMPLE - II: Montecarlo evaluation of π (revisited) 
In this example:
  • How to write and call and external function in the fortran main program 
  • How to write and call an external subroutine in the fortran main program 
  • How to write and use an external module in the fortran main program 
go back to the content section
Download the source code and the technical sheet (it is completely free: just have fun! :-) )
In order to compile and run the source codes given in the attached Listings, refer to the instructions in section before starting
ExternalProcedures.pdf
File Size: 152 kb
File Type: pdf
Download File

listing1_2.f
File Size: 5 kb
File Type: f
Download File

listing2_2.f
File Size: 6 kb
File Type: f
Download File

  • HOME
  • PUBLICATIONS
  • RESEARCH INTERESTS
  • CONTACTS
  • Teaching
  • RANDOM WORDS
  • FORTRAN .... OF COURSE!
  • Contents (Fortran)