Tutorial by Examples

Fortran is a language which can be compiled using compilers supplied by many vendors. Different compilers are available for different hardware platforms and operating systems. Some compilers are free software, some can be used free of charge and some require the purchase of a licence. The most comm...
Any Fortran program has to include end as last statement. Therefore, the simplest Fortran program looks like this: end Here are some examples of "hello, world" programs: print *, "Hello, world" end With write statement: write(*,*) "Hello, world" end For c...
Today Fortran is mainly used for numerical computation. This very simple example illustrates the basic program structure to solve quadratic equations: program quadratic !a comment !should be present in every separate program unit implicit none real :: a, b, c real :: discriminant...
Uppercase and lowercase letters of the alphabet are equivalent in the Fortran character set. In other words, Fortran is case insensitive. This behavior is in contrast with case-sensitive languages, such as C++ and many others. As a consequence, the variables a and A are the same variable. In princ...

Page 1 of 1