# Fortran Tutorial

## What is Fortran?

Fortran is a high level programming language which means Formula Translation and is widely used for numerical operations. Fortran language is the first high level programming language among all the languages. Persons with little mathematical background can learn this language easily. It is such language which is continuously developed in each decade. History of Fortran The inventor of this high level …

## What are the Usage and Advantage of FORTRAN Programming Language?

Usage of FORTRAN 1. This is widely used at space research centers, DRDO, NASA, ISRO and many of University like Cambridge, Department of Engineering etc. 2. FORTRAN Used commercially for technical and scientific computations. 3. FORTRAN Principal language on the IBM SP Supercomputer and all Cray machines. Advantage of FORTRAN Following are the important advantages of Fortran Language: 1. Fortran is a simple …

## Differences between Fortran 77 and Fortran 90 & 95

Differences between Fortran 77 and Fortran 90 and Fortron 95 1) Fortran 90 has more intrinsic functions than Fortran 77, and it adds intrinsic subroutines. The CF90 compiler accepts the following intrinsic functions, which are included in the Fortran 90 standard: ADJUSTL ADJUSTR ALL ALLOCATED ANY ASSOCIATED BIT_SIZE COUNT CSHIFT DIGITS DOT_PRODUCT EOSHIFT EPSILON EXPONENT FRACTION …

## Basics of Fortran

Basics are called the heart of any language. Without basics of any language you cannot imagine about any computer language. Basics of Fortran means how, what, where and which sentence, letters, digits and words can understand the Fortran Compiler. Characters set The Fortran character set consists of twenty-six letters, ten digits and thirteen special characters. …

## Constant In Fortran

A constant is a number which does not change till the end of a program. As we know in algebra 1, 2, 3,………etc are constant which have same value as it is given and cannot be changed. Just like that Fortran language have also constant whose value does not vary up to the end of …

## Fortran Variables

Fortran Variables  A quantity which may vary during program execution is called a variable. Variables names are name tags of memory location where numbers are stored. A number stored in a memory location with an integer variable name is an integer and one stored in a location with a real variable name may have a …

## Data Types In Fortran

Data Data are constants provided to a program for use in computation or processing or execution. Type Means the information determines the way in which it is represented and the operations which may be performed on it. Declaration of Fortran variables As we know computers have no mind. It is also called servant, means what …

## Fortran Expressions

Fortran Expressions We have already discussed about constants, integers, variables now we will study about the Fortran Expressions . What is Expression? Expressions are the statements formed by combination of operators and operands. Example: 1) a – b // it is an arithmetic expression in which a& b are operands and ‘-‘ is subtraction  operator. …

## Arithmetic & Integer Expressions in Fortran

Arithmetic Expressions To know about the Arithmetic Expressions first of all we must should know about Arithmetic Operators which is given below: Operation Fortran operator + Add – Subtract * Multiply / Divide ** Exponentiation Integer expressions We know about integers that it have no decimal point. These are expressed as the following rules like: …

## Real & Complex Expressions

Real Expressions There are following rules to express the Real expressions: 1) A signed or unsigned real variable name or real constant is an expression. Example: -A, 3.8, 2.0 etc. 2) A real expression connected by an arithmetic operator to an unsigned real variable name or an unsigned real constant is a real expression. Example: …

## Mixed & Character Expressions

Mixed expressions Mixed expressions in Arithmetic Expression are formed by using different types of integer, real, double precision or complex quantities. Example: Consider an arithmetic expression in which integer and real quantities occurs let I=5 and C= 2.5.This means here I is integer and C is real .If both are added then I + C …

## Relational Logical Expressions in fortran

Relational Logical Expressions are expressed with the help of Relational operators. Relational operators These are the relational operators: Mathematical symbol Meaning Fortran equivalent > greater than .GT. >= greater than or equal to .GE. < less than .LT. <= less than or equal to .LE. = equal to .EQ. <> not equal to .NE. Example: …

## Input Statement In Fortran

Input Statement It is necessary for solving a problem on a digital computer that the required data should be transformed from one of its input unit to its memory and this is done by input statements. Information is provided from several types of input units to its memory unit. A statement consists of one or …

## How to write a simple program in Fortran

As we know computer is a machine which have no mind. It does not understand our language. Computer have own language which converts our input data into its own language. For computer programming in Fortran language each line of the program is written in coding form which is known as Fortran coding form. For writing …

## Output statement In Fortran

The WRITE and PRINT statements are the data transfer output statement. The information from the memory unit is delivered to output unit and then the result or the value or the answer is display on the computer screen. The general form of the output statement is: PRINT*, output-list or WRITE(*,*) output-list output-list is a single expression …

## What is control statement in programming language?

Control Statement If a program is executed in normal flow then there is no problem but when some conditions are given then control commands helps us to make program execution easy. There are fourteen types of control statements: Arithmetic IF Logical IF Block IF ELSE IF ELSE END IF Unconditional GO TO Computed GO TO …

## If…Else statement

Types of If statement If statement in Fortran is used for decesion making. Depending upon conditions we can use any of the following IF statements in our FORTRAN program : 1) Arithmetic IF statement If in a program the condition is given as positive, negative or zero, then the arithmetic IF statement is used to …

## GO TO And DO statements

GO TO Statement 1) Unconditional GO TO statement Unconditional GO TO statement is used to jump from one statement number to the other in that program. The general form of an unconditional GO TO statement is: GO TO n where n is the statement number of an executable statement. Blanks between GO and TO are …

## CONTINUE & STOP statements

CONTINUE Statement The general form of a CONTINUE statement is: CONTINUE Execution of a CONTINUE statement has no effect. STOP Statement Stop Statement is used as a command to stop the execution of a program. You can say that this statement is the logical end of a program. The general form of a STOP statement …

## PAUSE And END statements

PAUSE Statement The general form of a PAUSE statement is: PAUSE [n] where n is a string which should not be more than five digits or it may be character constant. END Statement Every program must have an END statement which must be written at the end of the program. The general form of an END statement …