Jump to content

Fortran

From Wikibooks, open books for an open world

On the Programming languages bookshelf.


Template:Programmingnav

FORTRAN is a programming language mainly used by the scientific community. Its name is a contraction of FORmula TRANslation, and its aim is to provide a way to tell computers to calculate equations.


FORTRAN is very old. The original versions used punched cards to program with. FORTRAN's age is both a strength and a weakness. On one hand, FORTRAN has a huge number of libraries of code avaliable to work out almost any equation. However, its age also gives FORTRAN archaic features, especially in the earliest formats, such as FORTRAN-77.


Problems with F77 included the not-so-intuitive syntax, and requiring 6 spaces before any commands. However, most of these problems were fixed as newer specifications for FORTRAN came out: Fortran 90 and 95. In addition, many compilers have additional improvements for non-standard code. The F95 and F90 specifications differ very little.


About FORTRAN

History of Fortran


Overview

Learning Fortran for Programmers

If you have programmed before and would like to see a little bit of how Fortran works and is different from other programming languages, read this overview.

Differences between Fortran Versions

A quick overview of the differences between the F77, F90 and F95 versions.


Introduction to Fortran

Hello World
Beginning Fortran
Variables
Simple Input and Output
Simple math in Fortran
Program Flow
Subroutines and Functions
Modules

In-depth Fortran ideas

Preprocessing
String Manipulation
Programming Structure and Style
Fortran complex types
Memory Management & Common Blocks
Error Catching

Fortran and beyond

Language Overloading and Extensions
Combining Languages
Commented Source Code Library


Examples

Examples of Fortran in Action