Beginner Fortran 90 tutorial

Download Free course and training document about Fortran 90, tutorial on 20 pages for beginners by Guy Munhoven.

Table of contents

  • Basic program structure in Fortran
  • Exercise
  • Outputting data
  • Reading data
  • Do loops
  • Functions
  • Arrays
  • Subroutines

General structure of a Fortran 90 program

Fortran 90 distinguishes the following program units (scoping units):

  • main program;
  • subroutines: subroutines and functions;
  • modules;
  • block data.

At first, we will not deal with modules or block data. It should be noted that the modules are among the most useful innovations of Fortran 90.

Main program

The main program has the following structure:

[PROGRAM [program name]]
specification and declaration instructions
executable instructions
[CONTAINS internal procedures]
END [PROGRAM [program name]]

Everything enclosed in square brackets ([...]) is optional (the brackets themselves are to be omitted in all cases). The PROGRAM statement is not mandatory, but the END statement. The latter can be completed by the PROGRAM attribute which must then be followed by the name of the program

name of the program. Different types of content (specification instructions
and declaration, executable instructions, etc.) are described below.

Subroutines

The subroutine subroutines have a structure similar to that of the main program:

SUBROUTINE name of the subroutine [(arguments)]
specification and declaration instructions
executable instructions
[CONTAINS internal procedures]
END [SUBROUTINE name of the subroutine]

The END statement is mandatory, but not the SUBROUTINE additional specification. If it is given, which is recommended, especially in the case where several subroutines are gathered in the same file, it must be
completed by the name of the subroutine, exactly as specified on the SUBROUTIN line.
Subroutines are run using the CALL command name of the subroutine [(arguments)]

functions

Function type subroutines return a result by calling them by name:

[type] FUNCTION function name ([argument list])
specification and declaration instructions
executable instructions
[CONTAINS internal procedures]
END [FUNCTION function name]

The type (see below) can be specified (recommended); otherwise, it is determined by the default typing rules (see below).

Size : 134.745 Kb
File type : pdf
Downloads: 169
Created: 2018-05-21
Beginner Fortran 90 tutorial

Warning: Trying to access array offset on false in /home/tutovnfz/public_html/article.php on line 233

Others Fortran Tutorials

Programming in Fortran 95

Fortran 90/95 Programming Manual

Fortran 90 for Beginners

Getting started with Fortran language

Introduction to Programming using Fortran 95/2003/2008

Others related eBooks about Beginner Fortran 90 tutorial

Object-oriented Programming in C#

Download free course Object-oriented Programming in C#, pdf file on 485 pages by Kurt Normark....

Elementary Algorithms

This book introduces about elementary algorithms and data structure. It includes side-by-s..., download free Algorithms tutorial in PDF (642 pages) created by Larry LIU Xinyu ....

The Busy Coder's Guide to Android Development

This book tries to cover as much material as possible, but aimed more for people new to mobile development. The book includes dozens of sample projects, ready to run with your copy of the SDK - not just one huge project where you have difficulty finding the specific examples of the technique you a...

Learning akka PDF course

Download free Akka tutorial course in PDF, training file in 9 chapters and 29 pages. Free unaffiliated ebook created from Stack OverFlow contributor....

Evolve the Monolith to Microservices with Java and Node

Download free course Evolve the Monolith to Microservices with Java and Node, pdf file on 132 pages by Sandro De Santis, Luis Florez, Duy V Nguyen, Eduardo Rosa....

Practices of the Python Pro

Download free course Practices of the Python Pro, pdf file on 248 pages by Dane Hillard....

Optimizing software in C++

This is an optimization manual for advanced C++ programmers. This book are not for beginne..., download free C++ tutorial in PDF (176 pages) created by Agner Fog ....

ASP.NET WebHooks Succinctly

Download free course ASP.NET WebHooks Succinctly, pdf file on 94 pages by by Gaurav Arora....

Introduction to Eclipse

With this PDF tutorial you will learn how to creat a java program using Eclipse ,a free training document for download under 4 pages....

So You Want to Learn to Program? - Programming With BASIC-256

Learn to program a computer without the jargon and complexity of many programming books. Suitable for anybody age 10 to 100+ who wants to learn and is ready to experiment. This book engages through media (sound, color, shapes, and text to speech) and then introduces the concepts of structured prog...