# FORTRAN

#### FORTRAN

Fortran Online Resouces

Univeity of Michigan-Dearborn, Computer and Information Science This site contai History of Fortran Language and lot of links to useful sites.
http://www.engin.umd.umich....

Variables and the names of variables

Fundamentals of Fortran Computation
Variables and the names of variables
Integer
A whole number. It may...

Operations and Expressions

Operatio and Expressio
FORTRAN provide five basic arithmetic operatio:
Addition +
Subtraction -
Multiplication *
Div...

FORTRAN Tutorials – Input and Output

Input and Output
FORTRAN provides a great deal of power and flexibility in the reading of data and printing of results. And for the experienced programmer this power and fle...

Writing and Running a FORTRAN Program

STOP and END Statements
STOP
This statement may be written whenever it is necessary to stop executing statements in a program. There is normally a STOP a...

FORTRAN DO Statement

The DO Statement
This statement makes it possible to execute a section of a program repeatedly, with automatic changes in the value of an integer variable between...

FORTRAN File Handling

File Handling
So far we have assumed that the input/output has been to the standard input or the standard output. It is also possible to read or write from file...

FORTRAN Logical expressions

Trafer of control
Some times we want to execute statements in some order other than the normal one-after-the-other sequence. Sometimes we shall return to the begi...

FORTRAN Logical Operators

Logical Operato
The logical operato are:
Logical Operato.
Logical Operato...

FORTRAN Arrays

Arrays
Many scientific computatio use vecto and matrices (subscripted variables). The data type Fortran uses for representing such objects is the array. A one-dimeional array corresponds to a vect...

FORTRAN Subroutines and Functions

Subroutines and Functio
When a program is more than a few hundred lines long, it gets hard to follow. Fortran codes that solve real engineering problems often have te of thousands of lines. The onl...

History of FORTRAN Language

History
One of the oldest programming languages, the FORTRAN was developed by a team of programme at IBM led by John Backus, and was fit published in 1957. The name FORTRAN is an acronym for FORm...

FORTRAN parameter statement

For example, the circle area program should have been written like this:
program circle
real r, area, pi
parameter (pi = 3.14159)
c This program reads a real number r and prints
c the area of a c...

FORTRAN Expressions and assignments

Cotants
The simplest form of an expression is a cotant. There are 6 types of cotants, corresponding to the 6 data types. Here are some integer cotants:
1
0
-111
41767
+17Then we...

FORTRAN Logical Expressions

A logical expression can be formed by comparing arithmetic expressio using the following relational operato:
.LT. mea less than (<)
.LE. less than or equal (<=)
.GT. greater than (>)
.GE....

FORTRAN if statements

The simplest one is the logical ifstatement:
if ( logical expression) executable statement
This has to be written on one line. This example finds the absolute value of x:
if (x .LT. 0) x = -x
If m...

FORTRAN Loops

Fortran 77 has only one loop cotruct, called the do-loop. The do-loop corresponds to what is known as a for-loop in other languages. Other loop cotructs have to be simulated using the if and goto st...

Arrays in Fortran 77

To fully undetand how this works in Fortran 77, you will have to know not only the syntax for usage, but also how these objects are stored in memory in Fortran 77.One-dimeional arraysThe si...