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

Others Fortran Tutorials

Fortran 90/95 Programming Manual

Introduction to Programming using Fortran 95/2003/2008

Programming in Fortran 95

Fortran 90 for Beginners

Introduction to programming with Fortran 95

Others related eBooks about Beginner Fortran 90 tutorial

Java self learning

Download free Java tutorial for self learning , course tutorial training on pdf under 115 pages by Laura Lemay and Charles L. Perkins....

COBOL Programming

Download COBOL tutorial in PDF,a free training courses under 236 pages to learn the basics of COBOL language...

Learning Laravel by examples

With this PDF tutorial you will learn how to build a web application with Laravel PHP Framework version 4, free training document under 58 pages....

PC Assembly Language

This book has extensive coverage of interfacing assembly and C code and so might be of int..., download free Assembly tutorial in PDF (190 pages) created by Paul Carter ....

Restful Web Services

You've built web sites that can be used by humans. But can you also build web sites that are usable by machines? That's where the future lies, and that's what RESTful Web Services shows you how to do. The World Wide Web is the most popular distributed application in history, and Web services and mas...

Real-Time ASP.NET Core 3 Apps with SignalR Succinctly

Download free course Real-Time ASP.NET Core 3 Apps with SignalR Succinctly, pdf file on 81 pages by Dirk Strauss....

Principles of Programming Languages

Download free course Principles of Programming Languages, pdf file on 163 pages by Mike Grant, Zachary Palmer, Scott Smith....

C programming tutorial for professionals

Download free C language tutorial course in PDF, training file in 63 chapters and 342 pages. Free unaffiliated ebook created from Stack OverFlow contributor....

3D Game Development with LWJGL 3

Download free course 3D Game Development with LWJGL 3, pdf file on 371 pages by Self-publishing....

Eclipse and Java

Download free PDF tutorial about the Java development environnement 'Eclipse' and Java ,this document will helps you to learn the basics of using Eclipse for writing Java programs....