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

Introduction to programming with Fortran 95

Fortran 90 for Beginners

Programming in Fortran 95

Others related eBooks about Beginner Fortran 90 tutorial

Essential Python

This book written to provide clear and concise explanation of topics for programmers both starting to learn the Python programming language as well as those diving in more complex topics. Most examples are linked to online playground that allows you to change the code and re-run it....

Effective AWK Programming, 5th Edition

When processing text files, the awk language is ideal for handling data extraction, report..., download free AWK Programming tutorial in PDF (572 pages) created by ....

Microsoft Office SharePoint 2007 User Guide

Download Microsoft Office SharePoint 2007 User Guide in pdf, free tutorial on 48 pages....

Introduction to Csharp

Download free tutorial in PDF of C# (Csharp) , it's a training document under 65 pages for students who want to learn about the basics of CSharp programming language....

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....

COBOL in 21 days

This tutorial present an easy way to learn COBOL in a few days,free training courses in PDF for beginners and intermediate level users....

Neural Networks and Deep Learning

Neural Networks and Deep Learning currently provide the best solutions to many problems in image recognition, speech recognition, and natural language processing. This book will teach you the core concepts behind neural networks and deep learning. ...

Ruby Notes for Professionals

Download free course Ruby Notes for Professionals, pdf file on 234 pages by Stack Overflow Community....

VBA Notes for Professionals

Download free course VBA Notes for Professionals, pdf file on 202 pages by Stack Overflow Community....

Mastering iOS Game Development

iOS is an operating system for Apple manufactured phones and tablets. Mobile gaming is one..., download free Game Development tutorial in PDF (228 pages) created by Miguel DeQuadros ....